mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
Auto merge of #114206 - sethp:patch-1, r=Mark-Simulacrum
fix(ci): Ensure idempotence of user creation Previously, re-running `run.sh` in the same container would fail at the useradd step, because the user already exists. Instead, change that step to "create if not exists" semantics to ease interactive debugging of CI failures. Split out from https://github.com/rust-lang/rust/pull/111891 per request by `@jackh726`
This commit is contained in:
commit
9fca8e7517
@ -8,7 +8,7 @@ fi
|
||||
|
||||
if [ "$NO_CHANGE_USER" = "" ]; then
|
||||
if [ "$LOCAL_USER_ID" != "" ]; then
|
||||
useradd --shell /bin/bash -u $LOCAL_USER_ID -o -c "" -m user
|
||||
id -u user &>/dev/null || useradd --shell /bin/bash -u $LOCAL_USER_ID -o -c "" -m user
|
||||
export HOME=/home/user
|
||||
unset LOCAL_USER_ID
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user