sudo-rs does not support support `--preserve-env`
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
This bug report is based on information from https://github.com/canonical/action-build/pull/102.
Ubuntu 26.04 ships with sudo-rs, which does not support the `--preserve-env` option. So when building with the `ubuntu-26.04` runner image, we get a warning from the action like:
```
/usr/bin/sudo --preserve-env --user runner snapcraft pack --verbosity debug
sudo: preserving the entire environment is not supported, '--preserve-env' is ignored
2026-11-06 12:07:48.362 Starting snapcraft, version 9.2.1
...
```
When the `ubuntu-latest` alias is moved to 26.04, workflows using the alias will change behaviour.
It would probably be better not to use `--preserve-env`, and figure out what environment variables should be passed through to `*craft pack`. https://github.com/canonical/action-build/pull/102 suggests invoking `env` to set environment variables explicitly.
Evaluation history
No evaluation history available.
Update history
| Date | Change |
|---|---|
| updated | |
| updated | |
| updated | |
| created |
Related issues
No embedding available for this issue yet. Run scripts/run_llm.py evaluate to enable similarity search.