Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix docs for system/exec() PR1067 #1071

Merged
merged 1 commit into from
Aug 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/pkg/dsl/cst/builtin_function_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down