From e55efbbfad5fb62a099c312ea94bd2d445f769c1 Mon Sep 17 00:00:00 2001 From: Matt Forrester Date: Sun, 14 Aug 2022 04:55:05 +0100 Subject: [PATCH] doc: fix docs for system/exec() (#1071) Co-authored-by: Matthew Forrester --- internal/pkg/dsl/cst/builtin_function_manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/pkg/dsl/cst/builtin_function_manager.go b/internal/pkg/dsl/cst/builtin_function_manager.go index 30cf9be91..929cc5b4d 100644 --- a/internal/pkg/dsl/cst/builtin_function_manager.go +++ b/internal/pkg/dsl/cst/builtin_function_manager.go @@ -1934,14 +1934,14 @@ either case it should return a boolean.`, help: `'$output = exec( "command", ["arg1", "arg2"], - {"env": ["ENV_VAR=ENV_VALUE"], + {"env": ["ENV_VAR=ENV_VALUE", "ENV_VAR2=ENV_VALUE2"], "dir": "/tmp/run_command_here", "stdin_string": "this is input fed to program", "combined_output": true )' Run a command via executable, path, args and environment, yielding its stdout minus final carriage return.`, examples: []string{ - `exec("echo", ["Hello", "$YOUR_NAME"], {"env": "YOUR_NAME=World"}) outputs "Hello World"`, + `exec("echo", ["I don't do", "$SHELL things"], {"env": "SHELL=sh"}) outputs "I don't do $SHELL things"`, }, variadicFunc: bifs.BIF_exec, },