Skip to content

Commit 6779482

Browse files
committed
report error when working directory does not exist
1 parent 8005bd2 commit 6779482

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

entrypoint.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,18 @@ fi
3838
# Working Directory
3939
workingDirectory=$4
4040

41+
set +e
4142
if [[ -n $workingDirectory ]]; then
42-
cd "$workingDirectory"
43+
if [[ -d $workingDirectory ]]; then
44+
cd "$workingDirectory"
45+
else
46+
echo "ERROR: working-directory $workingDirectory does not exist"
47+
exit 1
48+
fi
4349
fi
4450

51+
set -e
52+
4553
# Log the actions
4654
set -x
4755

0 commit comments

Comments
 (0)