summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJoost Heitbrink <joostheitbrink@outlook.com>2022-09-21 20:11:44 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-22 08:12:08 +0900
commit780c8055378589e5a7d419789761c35d05295291 (patch)
tree34805004efba72d8e68bba2323262e89b34a0638 /README.md
parent63ed97efc361113eb8720a68186f62aa5a86f4a0 (diff)
downloadsystemd-780c8055378589e5a7d419789761c35d05295291.tar.gz
systemd-run: refuse --working-directory option with --scope
systemd-run's man page says the following about the working directory of the process: "If a command is run as transient scope unit, it will be executed by systemd-run itself as parent process and will thus inherit the execution environment of the caller." This means working directory assignment does not work, as evidenced by the following invocation: ```bash $ systemd-run --scope --property=WorkingDirectory=/tmp/ bash -c 'echo $(pwd)' Unknown assignment: WorkingDirectory=/tmp/ ``` However, using the shorthand switch --working-directory silently ignores this instead of giving a similar error. ```bash systemd-run --scope --user --working-directory=/tmp/ bash -c 'echo $(pwd)' Running scope as unit: run-r19cc32e744e64285814dbf2204637a2b.scope /home/test/projects/systemd ``` This commit fixes this by explicitly generating an error instead of silently ignoring the switch: ```bash $ systemd-run --scope --working-directory=/tmp/ bash -c 'echo $(pwd)' --working-directory is not supported in --scope mode. ```
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions