fix: PATH modifications are lost in LXC executions #1326

Merged
mfenniak merged 3 commits from mfenniak/forgejo-runner:fix-lxc-PATH-regression into main 2026-01-23 19:03:17 +00:00
Owner

Regression in #1287 -- --preserve-env=PATH was removed from the sudo command thoughtlessly, where this is required as sudo rewrites this env variable if not explicitly whitelisted.

Incorrect error output "unexpected error handling command output: %!w(*fs.PathError=&{read /dev/ptmx 5})" is also suppressed in this PR, which was added in #1287 but not correctly identified as still a typical exit path for the io.Copy loop.

Fixes #1324

  • bug fixes
    • PR: fix: PATH modifications are lost in LXC executions
Regression in https://code.forgejo.org/forgejo/runner/pulls/1287 -- `--preserve-env=PATH` was removed from the `sudo` command thoughtlessly, where this is required as `sudo` rewrites this env variable if not explicitly whitelisted. Incorrect error output "unexpected error handling command output: %!w(*fs.PathError=&{read /dev/ptmx 5})" is also suppressed in this PR, which was added in #1287 but not correctly identified as still a typical exit path for the `io.Copy` loop. Fixes #1324 <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/1326): <!--number 1326 --><!--line 0 --><!--description Zml4OiBgUEFUSGAgbW9kaWZpY2F0aW9ucyBhcmUgbG9zdCBpbiBMWEMgZXhlY3V0aW9ucw==-->fix: `PATH` modifications are lost in LXC executions<!--description--> <!--end release-notes-assistant-->
mfenniak force-pushed fix-lxc-PATH-regression from a974bc3c26
Some checks failed
issue-labels / release-notes (pull_request_target) Successful in 5s
checks / Build Forgejo Runner (pull_request) Failing after 54s
checks / validate pre-commit-hooks file (pull_request) Successful in 57s
checks / runner exec tests (pull_request) Has been skipped
checks / Build unsupported platforms (pull_request) Has been skipped
checks / integration tests (docker-latest) (pull_request) Has been skipped
checks / integration tests (docker-stable) (pull_request) Has been skipped
checks / validate mocks (pull_request) Successful in 1m3s
/ example-docker-compose (pull_request) Successful in 2m11s
/ example-lxc-systemd (pull_request) Has been cancelled
to da15db8ef3
All checks were successful
checks / validate mocks (pull_request) Successful in 42s
checks / validate pre-commit-hooks file (pull_request) Successful in 47s
checks / Build Forgejo Runner (pull_request) Successful in 50s
checks / runner exec tests (pull_request) Successful in 1m3s
/ example-docker-compose (pull_request) Successful in 2m35s
checks / Build unsupported platforms (pull_request) Successful in 1m57s
/ example-lxc-systemd (pull_request) Successful in 8m25s
checks / integration tests (docker-stable) (pull_request) Successful in 14m28s
checks / integration tests (docker-latest) (pull_request) Successful in 11m50s
issue-labels / release-notes (pull_request_target) Successful in 4s
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 6s
cascade / forgejo (pull_request_target) Successful in 1m19s
2026-01-23 18:11:57 +00:00
Compare
Contributor

cascading-pr updated at actions/setup-forgejo#851

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/851
aahlenst approved these changes 2026-01-23 18:45:48 +00:00
mfenniak deleted branch fix-lxc-PATH-regression 2026-01-23 19:03:18 +00:00
viceice approved these changes 2026-01-23 19:39:27 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner!1326
No description provided.