From ecec51511425a529efb74f2dcb1d8769be4dd7c3 Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Sat, 31 Jan 2026 09:26:27 +1000 Subject: [PATCH] fix bash mistakes --- serve | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/serve b/serve index b510ca1..aac8f14 100755 --- a/serve +++ b/serve @@ -4,7 +4,7 @@ # | sass # ===== Configuration ===== # -ADDR="127.0.01" # bind address +ADDR="127.0.0.1" # bind address PORT="8000" # bind port WEBROOT="www" # root web directory USE_INDEX=true @@ -32,7 +32,7 @@ function watch_scss { } function host { - local args=$@ + local args=( "$@" ) # Apply Flags if [[ "$NO_CACHE" == true ]]; then args+=("--nocache") @@ -44,7 +44,7 @@ function host { # Apply Options args+=(--ip "$ADDR" --port "$PORT") - simple-http-server $args $@ -- "$WEBROOT" + simple-http-server "${args[@]}" "$@" -- "$WEBROOT" } trap cleanup EXIT @@ -56,4 +56,4 @@ watch_scss & SASS_PID=$! # host dev server -host ${SRV_ARGS[@]} +host "${SRV_ARGS[@]}"