Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent use of BIN_NAME in activation scripts #1577

Merged
merged 1 commit into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/gourgeist/src/activator/activate
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fi
export VIRTUAL_ENV

_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/bin:$PATH"
PATH="$VIRTUAL_ENV/{{ BIN_NAME }}:$PATH"
export PATH

if [ "x" != x ] ; then
Expand Down
2 changes: 1 addition & 1 deletion crates/gourgeist/src/activator/activate.csh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ deactivate nondestructive
setenv VIRTUAL_ENV '{{ VIRTUAL_ENV_DIR }}'

set _OLD_VIRTUAL_PATH="$PATH:q"
setenv PATH "$VIRTUAL_ENV:q/bin:$PATH:q"
setenv PATH "$VIRTUAL_ENV:q/{{ BIN_NAME }}:$PATH:q"



Expand Down
2 changes: 1 addition & 1 deletion crates/gourgeist/src/activator/activate.fish
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if test (echo $FISH_VERSION | head -c 1) -lt 3
else
set -gx _OLD_VIRTUAL_PATH $PATH
end
set -gx PATH "$VIRTUAL_ENV"'/bin' $PATH
set -gx PATH "$VIRTUAL_ENV"'/{{ BIN_NAME }}' $PATH

# Prompt override provided?
# If not, just use the environment name.
Expand Down
2 changes: 1 addition & 1 deletion crates/gourgeist/src/activator/activate.nu
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export-env {
}

let virtual_env = '{{ VIRTUAL_ENV_DIR }}'
let bin = 'bin'
let bin = '{{ BIN_NAME }}'

let is_windows = ($nu.os-info.family) == 'windows'
let path_name = (if (has-env 'Path') {
Expand Down
2 changes: 1 addition & 1 deletion crates/gourgeist/src/activator/activate_this.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
raise AssertionError(msg) from exc

bin_dir = os.path.dirname(abs_file)
base = bin_dir[: -len("bin") - 1] # strip away the bin part from the __file__, plus the path separator
base = bin_dir[: -len("{{ BIN_NAME }}") - 1] # strip away the bin part from the __file__, plus the path separator

# prepend bin to PATH (this file is inside the bin directory)
os.environ["PATH"] = os.pathsep.join([bin_dir, *os.environ.get("PATH", "").split(os.pathsep)])
Expand Down