Browse Source

Fix `fnm env` for fish shell. (#91)

I added `-gx` to the `set` commands for fish so that the variables can be picked up by later runs of fnm. There are cases where the setup current code already works however it doesn't when the `FNM_...` variables haven't been exported globally before.
remotes/origin/add-simple-redirecting-site
Harald Wartig 6 years ago committed by Gal Schlezinger
parent
commit
4f7eeb12d6
  1. 8
      executable/Env.re

8
executable/Env.re

@ -104,12 +104,12 @@ let run = (~forceShell, ~multishell, ~nodeDistMirror, ~fnmDir, ~useOnCd) => { @@ -104,12 +104,12 @@ let run = (~forceShell, ~multishell, ~nodeDistMirror, ~fnmDir, ~useOnCd) => {
)
|> Console.log;
| Fish =>
Printf.sprintf("set PATH %s/bin $PATH;", path) |> Console.log;
Printf.sprintf("set %s %s;", Config.FNM_MULTISHELL_PATH.name, path)
Printf.sprintf("set -gx PATH %s/bin $PATH;", path) |> Console.log;
Printf.sprintf("set -gx %s %s;", Config.FNM_MULTISHELL_PATH.name, path)
|> Console.log;
Printf.sprintf("set %s %s;", Config.FNM_DIR.name, fnmDir) |> Console.log;
Printf.sprintf("set -gx %s %s;", Config.FNM_DIR.name, fnmDir) |> Console.log;
Printf.sprintf(
"set %s %s",
"set -gx %s %s",
Config.FNM_NODE_DIST_MIRROR.name,
nodeDistMirror,
)

Loading…
Cancel
Save