Skip to content

Commit 62cb829

Browse files
authored
Return an empty record instead of an empty list in capture-foreign-env (#1954)
load-env happily accepts an empty record but not an empty list
1 parent 670b230 commit 62cb829

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cookbook/foreign_shell_scripts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def capture-foreign-env [
115115
| where { |line| $line not-in $env_out.before } # Only get changed lines
116116
| parse "{key}={value}"
117117
| transpose --header-row --as-record
118+
| if $in == [] { {} } else { $in }
118119
}
119120
```
120121

0 commit comments

Comments
 (0)