Skip to content

Commit a11164c

Browse files
committed
Add checks to entrypoint
1 parent 74290ef commit a11164c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tools/docker/entrypoint.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ set -e
77
# see git-config manual page.
88
if [ -n "${LIBBUILDER_GIT_SAFE_DIR+x}" ]
99
then
10-
echo "Adding following directories into git's safe.directory"
11-
echo "$LIBBUILDER_GIT_SAFE_DIR" | tr ':' '\n' | while read -r dir
12-
do
13-
git config --global --add safe.directory "$dir"
14-
echo " $dir"
15-
done
10+
echo "Adding following directories into git's safe.directory"
11+
echo "$LIBBUILDER_GIT_SAFE_DIR" | tr ':' '\n' | while read -r dir
12+
do
13+
git config --global --add safe.directory "$dir"
14+
echo " $dir"
15+
done
1616
fi
1717

1818
# Check if the mount point /arduino-esp32 exists
19-
if [ -d "/arduino-esp32" ]; then
20-
# If it exists, add the -p and -c arguments
19+
if [ -d "/arduino-esp32" ] && [[ "$@" == "python3 tools/config_editor/app.py"* ]]; then
20+
# Running UI with mount point detected, adding -p and -c arguments
2121
exec "$@" -c /arduino-esp32 -p `stat -c "%u:%g" /arduino-esp32`
2222
else
23-
# If it doesn't exist, just execute the command without them
23+
# Running UI without mount point detected or running another command
2424
exec "$@"
2525
fi

0 commit comments

Comments
 (0)