diff --git a/bin/start-ds.sh b/bin/start-ds.sh
index 769506f02a2e223c0bf1f3d35b5369b4eb2da3c8..a48b0b4554cd2ef9380cbc482b07edfc38203043 100755
--- a/bin/start-ds.sh
+++ b/bin/start-ds.sh
@@ -40,6 +40,6 @@ fi
 
 # Return to the stored the directory, this preserves the working_dir argument in
 # docker-compose files.
-cd "$CWD"
+cd "$CWD" || exit 1
 
 /usr/local/bin/wait-for-it.sh "$TANGO_HOST" --timeout=30 --strict -- "$@"