mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
ci: pin XDG_CONFIG_HOME for the cross-user e2e step; terse doctor fix
GitHub runners export XDG_CONFIG_HOME=/home/runner/.config and it leaks through sudo -u, so the pmgtest pmg resolved the runner user's config dir and fail-closed on its runner-owned log file (run 29289868727 shows the triaged error catching exactly this). Set it inside the login shell so it wins regardless of how the leak is delivered. The remedy now returns a full-help and doctor-table pair from a single triage, and drops the do-not-chown tail from the leak message.
This commit is contained in:
@@ -1000,6 +1000,11 @@ jobs:
|
||||
# Pass runner PATH so setup-node's npm remains visible after FilterPMGFromPath.
|
||||
sudo -u pmgtest env "PATH=/usr/local/lib/pmg/bin:$PATH" HOME=/home/pmgtest bash -lc '
|
||||
set -euo pipefail
|
||||
# GH runners export XDG_CONFIG_HOME=/home/runner/.config and it
|
||||
# leaks through sudo -u, so pmg would resolve the runner user
|
||||
# config dir and fail on its runner-owned log file.
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
echo "HOME=$HOME XDG_CONFIG_HOME=$XDG_CONFIG_HOME"
|
||||
which npm | grep -q /usr/local/lib/pmg/bin/npm
|
||||
mkdir -p "$HOME/sys-e2e" && cd "$HOME/sys-e2e"
|
||||
npm init -y
|
||||
|
||||
Reference in New Issue
Block a user