From cc75177539081a2dabdca7ebc3bf795d2fe63a43 Mon Sep 17 00:00:00 2001 From: Megh Parikh Date: Thu, 26 Jun 2025 01:12:43 -0400 Subject: [PATCH] Return an empty record instead of an empty list in capture-foreign-env load-env happily accepts an empty record but not an empty list --- cookbook/foreign_shell_scripts.md | 1 + 1 file changed, 1 insertion(+) 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 } } ```