Skip to content

Commit

Permalink
nu: fix capture env on 0.95
Browse files Browse the repository at this point in the history
  • Loading branch information
chris468 committed Jun 29, 2024
1 parent 54e5fda commit 60bbf53
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,8 @@ export def --env capture [
let captured_env = (with-env {
SCRIPT: $script
} {
^(if $shell == "" { default_shell } else { $shell }) ...$arguments -c `
env -0
echo "<CAPTURE_ENV>"
eval "$SCRIPT"
echo "<CAPTURE_ENV>"
env -0
`
(^(if $shell == "" { default_shell } else { $shell }) ...$arguments -c
'env -0 ; echo "<CAPTURE_ENV>" ; eval "$SCRIPT" ; echo "<CAPTURE_ENV>" ; env -0')
} | split row "<CAPTURE_ENV>"
| {
original: ($in | first | str trim | split row "\u{0}" | parse-env)
Expand Down

0 comments on commit 60bbf53

Please sign in to comment.