mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
run: make --working-directory= work for --scope too
This sounds like a more user-friendly alternative to #24780
This commit is contained in:
parent
c7b5ea6955
commit
fecc447766
@ -1529,6 +1529,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