Skip to content

Commit

Permalink
fix(hooks): paths vars not exported properly in fish
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohe-Am committed Jan 20, 2024
1 parent f380522 commit 2f2b2c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions install/ghjk.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
export GHJK_SHARE_DIR="${GHJK_SHARE_DIR:-__GHJK_SHARE_DIR__}"
export DENO_DIR="${GHJK_DENO_DIR:-__DENO_CACHE_DIR}"
export DENO_NO_UPDATE_CHECK=1

# if ghjkfile var is set, set the GHJK_DIR overriding
# any set by the user
Expand Down
1 change: 0 additions & 1 deletion install/hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export GHJK_LAST_PWD="$PWD"

precmd() {
if [ "$GHJK_LAST_PWD" != "$PWD" ]; then
echo "reloading"
ghjk_reload
export GHJK_LAST_PWD="$PWD"
fi
Expand Down
4 changes: 2 additions & 2 deletions modules/ports/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1087,8 +1087,8 @@ export ${k}="${v}:$${k}";
set --global --export ${k} '${v}';`
),
...Object.entries(pathVars).map(([k, v]) =>
`set --global --append GHJK_CLEANUP_FISH 'set --global --path ${k} (string match --invert --regex "^${envDir}" $${k});';
set --global --prepend ${k} ${v};
`set --global --append GHJK_CLEANUP_FISH 'set --global --export --path ${k} (string match --invert --regex "^${envDir}" $${k});';
set --global --export --prepend ${k} ${v};
`
),
].join("\n"),
Expand Down

0 comments on commit 2f2b2c3

Please sign in to comment.