fix: preserve global flags when sudo is sudo-rs
`sudo-rs`, the default sudo on Ubuntu 25.10 and later, does not support preserving the entire environment, so `--quiet`, `--trace`, `--force` and `--app` stopped taking effect once `dokku` re-executed itself as the `dokku` user, and a warning was printed on every invocation. Variables outside the set dokku forwards no longer cross that boundary and can be named in `DOKKU_PRESERVE_ENV` instead.
This commit is contained in:
14 files changed
+403
-10
No files matched your search
@@ -35,6 +35,9 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
# the leading --label is replayed out of DOKKU_GLOBAL_FLAGS by
|
||||
# plugins/scheduler-docker-local/scheduler-run, so this also covers that variable
|
||||
# surviving the re-exec as the dokku user
|
||||
RANDOM_RUN_CID="$(dokku --label=com.dokku.test-label=value run:detached $TEST_APP sleep 300)"
|
||||
run /bin/bash -c "docker inspect -f '{{ .State.Status }}' $RANDOM_RUN_CID"
|
||||
echo "output: $output"
|
||||
|
||||
Reference in new issue
Block a user