Skip to content

Commit

Permalink
update nushell's str collect command to str join (#2532)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
fdncred and pre-commit-ci[bot] committed Mar 31, 2023
1 parent 461cd26 commit 02585da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/changelog/2532.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The nushell command 'str collect' has been superseded by the 'str join' command. The activate.nu script has
been updated to reflect this change.
4 changes: 2 additions & 2 deletions src/virtualenv/activation/nushell/activate.nu
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export-env {
)

let venv_path = ([$virtual_env $bin] | path join)
let new_path = ($old_path | prepend $venv_path | str collect $path_sep)
let new_path = ($old_path | prepend $venv_path | str join $path_sep)

let new_env = {
$path_name : $new_path
Expand Down Expand Up @@ -102,7 +102,7 @@ export-env {
})

$new_env | merge {
_OLD_VIRTUAL_PATH : ($old_path | str collect $path_sep)
_OLD_VIRTUAL_PATH : ($old_path | str join $path_sep)
_OLD_PROMPT_COMMAND : $old_prompt_command
PROMPT_COMMAND : $new_prompt
VIRTUAL_PROMPT : $virtual_prompt
Expand Down

0 comments on commit 02585da

Please sign in to comment.