subprocess
subprocess copied to clipboard
Add support for setting options and exporting environment variables
Something close to the following syntax can be supported to set bash-like options and export environment variables:
{
subprocess::set(pipefail);
subprocess::export("var_name", "var_value");
return (subprocess::command{"random_cmd"} | subprocess::command{"another_cmd"}).run();
}
// pipefail is automatically unset
// var_name is automatically unset