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

Remove the PYTHONEXECUTABLE variable from nushell scripts #1

Merged
merged 1 commit into from
Sep 16, 2021
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
3 changes: 0 additions & 3 deletions src/virtualenv/activation/nushell/activate.nu
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ let old-path = ($nu.path | str collect ($path-sep))
let venv-path = ([$virtual-env $bin] | path join)
let new-path = ($nu.path | prepend $venv-path | str collect ($path-sep))

let python_executable = ([$virtual-env $bin "python.exe"] | path join)

# environment variables that will be batched loaded to the virtual env
let new-env = ([
[name, value];
[PATH $new-path]
[_OLD_VIRTUAL_PATH $old-path]
[VIRTUAL_ENV $virtual-env]
[PYTHONEXECUTABLE $python_executable]
])

load-env $new-env
Expand Down
1 change: 0 additions & 1 deletion src/virtualenv/activation/nushell/deactivate.nu
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ let-env $path-name = $nu.env._OLD_VIRTUAL_PATH
unlet-env VIRTUAL_ENV
unlet-env _OLD_VIRTUAL_PATH
unlet-env PROMPT_STRING
unlet-env PYTHONEXECUTABLE

unalias pydoc
unalias deactivate