Skip to content

Commit 29c9397

Browse files
fix apt warning
1 parent ff6c56a commit 29c9397

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/actions/bombsquad_build_env/action.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,22 +97,23 @@ runs:
9797
if: ${{ inputs.using-cmake == 'true' }}
9898
shell: bash
9999
run: |
100-
# apt drops privileges to _apt to download, so it needs to own the
101-
# archive dir; we take it back afterwards so the cache save (which
102-
# runs as the runner user) can read it.
100+
# apt's fetch sandbox drops to the _apt user, which can't reach an
101+
# archive dir inside the runner workspace -- apt notices and falls
102+
# back to fetching as root anyway, just with a warning per package.
103+
# Ask for that fallback explicitly so it isn't noise. Downloads then
104+
# land as root:root 0644, which the cache save (running as the
105+
# runner user) can still read.
103106
mkdir -p .cache/apt-archives/partial
104-
sudo chown -R _apt:root .cache/apt-archives
105107
sudo apt-get update -qq -o Acquire::Languages=none
106108
sudo apt-get install -y --no-install-recommends \
107109
-o Dir::Cache::archives="$PWD/.cache/apt-archives" \
110+
-o APT::Sandbox::User=root \
108111
libglut-dev \
109112
libopenal-dev \
110113
libvorbis-dev \
111114
libpango1.0-dev \
112115
ninja-build \
113116
libsdl3-dev
114-
115-
sudo chown -R "$(id -u):$(id -g)" .cache/apt-archives
116117
- name: Setup env variables
117118
if: ${{ inputs.using-cmake == 'true' }}
118119
shell: bash

0 commit comments

Comments
 (0)