meson/docs/markdown/snippets/run_command_env.md

297 B

run_command accepts env kwarg

You can pass environment object to run_command, just like to test:

env = environment()
env.set('FOO', 'bar')
run_command('command', 'arg1', 'arg2', env: env)