diff options
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/run_command_env.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/markdown/snippets/run_command_env.md b/docs/markdown/snippets/run_command_env.md new file mode 100644 index 0000000..dfa5ac5 --- /dev/null +++ b/docs/markdown/snippets/run_command_env.md @@ -0,0 +1,9 @@ +## `run_command` accepts `env` kwarg + +You can pass [`environment`](Reference-manual.html#environment-object) object to [`run_command`](Reference-manual.html#run-command), just like to `test`: + +```meson +env = environment() +env.set('FOO', 'bar') +run_command('command', 'arg1', 'arg2', env: env) +``` |