Skip to content

Commit c53552f

Browse files
committed
bash is the work of satan
1 parent 47ece37 commit c53552f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

launchtools/launch-standard-docker.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ docker build --build-arg UID=$UID -f launchtools/StandardDockerfile.docker -t sw
1111

1212
# Run this script with 'fixch' to run as root in the container and chown to the correct user
1313
SETUSER="--user $UID:$(id -g) --cap-drop=ALL"
14-
# TODO: Validate arg spacing handling
15-
POSTARG="--forward_restart $@"
14+
POSTARG=("--forward_restart" "$@")
1615
if [[ "$1" == "fixch" ]]
1716
then
1817
SETUSER=""
19-
POSTARG="fixch $UID"
18+
POSTARG=("fixch" "$UID")
2019
fi
2120

2221
# add "--network=host" if you want to access other services on the host network (eg a separated comfy instance)
@@ -31,7 +30,7 @@ docker run -it \
3130
-v "$PWD/Models:/SwarmUI/Models" \
3231
-v "$PWD/Output:/SwarmUI/Output" \
3332
-v "$PWD/src/BuiltinExtensions/ComfyUIBackend/CustomWorkflows:/SwarmUI/src/BuiltinExtensions/ComfyUIBackend/CustomWorkflows" \
34-
--gpus=all -p 7801:7801 swarmui "$POSTARG"
33+
--gpus=all -p 7801:7801 swarmui "${POSTARG[@]}"
3534

3635
if [ $? == 42 ]; then
3736
exec "$SCRIPT_DIR/launch-standard-docker.sh" "$@"

0 commit comments

Comments
 (0)