Skip to content

Commit 6fe7713

Browse files
authored
change match to case-insensitive (#1128)
`micromamba 2.1.1` change the output of `micromamba info` to lower case. Change the match to case-insensitive to make it work on version `2.1.1`
1 parent 3c32fbf commit 6fe7713

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • modules/virtual_environments/nu_conda_2

modules/virtual_environments/nu_conda_2/conda.nu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def --env load-conda-info-env [] {
7171
try {
7272
# Corrected syntax: Pass arguments as separate strings to run-external
7373
let mi_info_lines = (run-external $cmd_base "info" | lines)
74-
let base = ($mi_info_lines | where $it =~ "Base Environment" | parse "{key}: {value}" | get value | str trim | first)
75-
let dirs_line = ($mi_info_lines | where $it =~ "Envs Directories" | first)
74+
let base = ($mi_info_lines | where $it =~ "(?i)Base Environment" | parse "{key}: {value}" | get value | str trim | first)
75+
let dirs_line = ($mi_info_lines | where $it =~ "(?i)Envs Directories" | first)
7676
let dirs = if ($dirs_line | is-empty) { [] } else { $dirs_line | parse "{key}: {value}" | get value | str trim | split row " " }
7777

7878
# Corrected syntax: Pass arguments as separate strings to run-external
@@ -336,4 +336,4 @@ def system-path [] {
336336
# Helper to check if an environment variable exists
337337
def has-env [name: string] {
338338
$name in $env
339-
}
339+
}

0 commit comments

Comments
 (0)