Skip to content

Commit

Permalink
add windows handling
Browse files Browse the repository at this point in the history
  • Loading branch information
cvanelteren committed Jan 28, 2025
1 parent 8d4adf9 commit 19fe400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libmamba/src/core/shell_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ namespace mamba
#ask mamba how to setup the environment and set the environment
(^($env.MAMBA_EXE) shell activate --shell nu $name
| str replace --regex '\s+' '' --all
| split row ";"
| split row (if $nu.os-info.name == "windows" { ";" } else { ":" })
| parse --regex '(.*)=(.+)'
| transpose --header-row
| into record
Expand All @@ -516,7 +516,7 @@ namespace mamba
if $env.CONDA_PROMPT_MODIFIER? != null {
# unset set variables
for x in (^$env.MAMBA_EXE shell deactivate --shell nu
| split row ";") {
| split row (if $nu.os-info.name == "windows" { ";" } else { ";" }) {
if ("hide-env" in $x) {
hide-env ($x | parse "hide-env {var}").var.0
} else if $x != "" {
Expand Down

0 comments on commit 19fe400

Please sign in to comment.