Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 24, 2025
1 parent cefab02 commit 018d5c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/virtualenv/activation/nushell/activate.nu
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ export-env {
} else {
# Creating the new prompt for the session
let virtual_prefix = $"(char lparen)($virtual_env | path basename)(char rparen) "

# Back up the old prompt builder
let old_prompt_command = if (has-env 'PROMPT_COMMAND') {
$env.PROMPT_COMMAND
} else {
""
}

let new_prompt = if (has-env 'PROMPT_COMMAND') {
if 'closure' in ($old_prompt_command | describe) {
{|| $'($virtual_prefix)(do $old_prompt_command)' }
Expand All @@ -101,7 +101,7 @@ export-env {
} else {
{|| $'($virtual_prefix)' }
}

# Ensure the correct variable name for the test
$new_env | merge {
_OLD_VIRTUAL_PATH : ($old_path | str join $path_sep)
Expand All @@ -110,7 +110,7 @@ export-env {
VIRTUAL_PREFIX : $virtual_prefix # Change here to match the test expectation
}
}


# Load environment variables to activate the virtualenv
load-env $new_env
Expand Down

0 comments on commit 018d5c7

Please sign in to comment.