Merge pull request 'Fix the check of a workspace dir inside the home.' (#15) from andrea.dellamico/docker-jenkins-integration-test:master into master

Reviewed-on: #15
This commit is contained in:
Andrea Dell'Amico 2022-04-02 01:53:27 +02:00
commit 9059ee86b1
1 changed files with 5 additions and 3 deletions

View File

@ -27,10 +27,12 @@ chown ${USER}:${USER} $workspace_dir
chown -R ${USER}:${USER} $workspace_logdir
_retval=
/bin/rm /home/${USER}/workspace
_retval=$?
if [ -d /home/${USER}/workspace ]; then
rmdir /home/${USER}/workspace
_retval=$?
fi
if [ $_retval -ne 0 ]; then
echo "The user has a directory named 'workspace' inside their home directory"
echo "The user has a directory named 'workspace' inside their home directory and it is not empty."
echo "Not starting the workspace mount"
exit
else