mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-08 05:57:26 +03:00
run: make --working-directory= work for --scope too
This sounds like a more user-friendly alternative to #24780 (cherry picked from commit fecc44776638a24099ce7e9ac227bcaa2c34f1e0) (cherry picked from commit c948091cc54fda83923f3c13be51f4de1b422c59)
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…
x
Reference in New Issue
Block a user