diff --git a/cookbook/foreign_shell_scripts.md b/cookbook/foreign_shell_scripts.md index 91d3a97fa04..63d09cfc84b 100644 --- a/cookbook/foreign_shell_scripts.md +++ b/cookbook/foreign_shell_scripts.md @@ -115,6 +115,7 @@ def capture-foreign-env [ | where { |line| $line not-in $env_out.before } # Only get changed lines | parse "{key}={value}" | transpose --header-row --as-record + | if $in == [] { {} } else { $in } } ```