fix(ci): trouver cargo dans ~/.cargo/bin quand le service du runner ne le met pas dans le PATH
CI / Formatting, tests and builds (push) Successful in 28m1s
CI / Formatting, tests and builds (push) Successful in 28m1s
Le runner a perdu cargo de son PATH entre le 30 octobre et le 2 novembre (run 368: cargo: command not found). L'étape d'outils ajoute ~/.cargo/bin quand il existe, et sinon s'arrête en disant quoi installer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
868a9dd4a4
commit
1d916dc60d
2 files changed
+24
-4
No files matched your search
+12
-2
@@ -47,8 +47,18 @@ jobs:
|
||||
# nasm, file and desktop-file-validate may be installed by the runner's
|
||||
# administrator in ~/.local/bin, outside the session PATH. When they
|
||||
# are missing there, the pipeline falls back on what the system provides.
|
||||
if [ -d "$HOME/.local/bin" ]; then
|
||||
echo "PATH=$HOME/.local/bin:$PATH" >> "$GITHUB_ENV"
|
||||
# rustup's ~/.cargo/bin likewise: the runner service does not always
|
||||
# read the profile that adds it.
|
||||
path="$PATH"
|
||||
for dir in "$HOME/.local/bin" "${CARGO_HOME:-$HOME/.cargo}/bin"; do
|
||||
if [ -d "$dir" ]; then
|
||||
path="$dir:$path"
|
||||
fi
|
||||
done
|
||||
echo "PATH=$path" >> "$GITHUB_ENV"
|
||||
if ! PATH="$path" command -v cargo >/dev/null; then
|
||||
echo "cargo not found (HOME=$HOME, PATH=$path): install rustup for the runner's user" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Versions
|
||||
|
||||
@@ -46,8 +46,18 @@ jobs:
|
||||
# nasm, file and desktop-file-validate may be installed by the runner's
|
||||
# administrator in ~/.local/bin, outside the session PATH. When they
|
||||
# are missing there, the pipeline falls back on what the system provides.
|
||||
if [ -d "$HOME/.local/bin" ]; then
|
||||
echo "PATH=$HOME/.local/bin:$PATH" >> "$GITHUB_ENV"
|
||||
# rustup's ~/.cargo/bin likewise: the runner service does not always
|
||||
# read the profile that adds it.
|
||||
path="$PATH"
|
||||
for dir in "$HOME/.local/bin" "${CARGO_HOME:-$HOME/.cargo}/bin"; do
|
||||
if [ -d "$dir" ]; then
|
||||
path="$dir:$path"
|
||||
fi
|
||||
done
|
||||
echo "PATH=$path" >> "$GITHUB_ENV"
|
||||
if ! PATH="$path" command -v cargo >/dev/null; then
|
||||
echo "cargo not found (HOME=$HOME, PATH=$path): install rustup for the runner's user" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Version and tag
|
||||
|
||||
Reference in new issue
Block a user