mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-26 08:55:18 +03:00
run: make --working-directory= work for --scope too
This sounds like a more user-friendly alternative to #24780 (cherry picked from commitfecc447766
) (cherry picked from commitc948091cc5
)
This commit is contained in:
parent
40766f6a48
commit
3f074e438a
@ -1531,6 +1531,9 @@ static int start_transient_scope(sd_bus *bus) {
|
||||
return log_error_errno(errno, "Failed to change UID to " UID_FMT ": %m", uid);
|
||||
}
|
||||
|
||||
if (arg_working_directory && chdir(arg_working_directory) < 0)
|
||||
return log_error_errno(errno, "Failed to change directory to '%s': %m", arg_working_directory);
|
||||
|
||||
env = strv_env_merge(environ, user_env, arg_environment);
|
||||
if (!env)
|
||||
return log_oom();
|
||||
|
Loading…
Reference in New Issue
Block a user