diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-04-17 08:31:49 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-04-17 08:31:49 +0200 |
| commit | 91ba1c79fd205c5b83f363f32853a0eafbc4ef4a (patch) | |
| tree | faed98c515a72619e96347dccaa5c8a76aa9baf1 /fnl/conf/nix-develop | |
| parent | 65391314b5dfe5ef871929324046b7e13a288d02 (diff) | |
check for print-dev-env output
Diffstat (limited to 'fnl/conf/nix-develop')
| -rw-r--r-- | fnl/conf/nix-develop/init.fnl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fnl/conf/nix-develop/init.fnl b/fnl/conf/nix-develop/init.fnl index 62b0429..fed6173 100644 --- a/fnl/conf/nix-develop/init.fnl +++ b/fnl/conf/nix-develop/init.fnl @@ -62,13 +62,14 @@ (set nix-print-dev-env (.. nix-print-dev-env data)) (do (P {:msg "stdout end" : stdout}) - (vim.schedule #(each [key {: type : value} (pairs (. (vim.fn.json_decode nix-print-dev-env) - :variables))] - (do - (if (and (exported? type) - (not (ignored? key))) - (do - (set-env key value))))))))))) + (if (not= data "") + (vim.schedule #(each [key {: type : value} (pairs (. (vim.fn.json_decode nix-print-dev-env) + :variables))] + (do + (if (and (exported? type) + (not (ignored? key))) + (do + (set-env key value)))))))))))) (vim.api.nvim_create_user_command :NixDevelop (fn [ctx] |
