Commit 6b995760 authored by Gábor Szeder's avatar Gábor Szeder Committed by Junio C Hamano

travis-ci: don't fail if user already exists on 32 bit Linux build job

The 32 bit Linux build job runs in a Docker container, which lends
itself to running and debugging locally, too.  Especially during
debugging one usually doesn't want to start with a fresh container
every time, to save time spent on installing a bunch of dependencies.
However, that doesn't work quite smootly, because the script running
in the container always creates a new user, which then must be removed
every time before subsequent executions, or the build script fails.

Make this process more convenient and don't try to create that user if
it already exists and has the right user ID in the container, so
developers don't have to bother with running a 'userdel' each time
before they run the build script.

The build job on Travis CI always starts with a fresh Docker
container, so this change doesn't make a difference there.
Signed-off-by: Gábor Szeder's avatarSZEDER Gábor <>
Signed-off-by: default avatarJunio C Hamano <>
parent 53303302
......@@ -33,7 +33,13 @@ then
useradd -u $HOST_UID $CI_USER
if test "$(id -u $CI_USER 2>/dev/null)" = $HOST_UID
echo "user '$CI_USER' already exists with the requested ID $HOST_UID"
useradd -u $HOST_UID $CI_USER
# Due to a bug the test suite was run as root in the past, so
# a prove state file created back then is only accessible by
# root. Now that bug is fixed, the test suite is run as a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment