Skip to content

Commit cf72f4e

Browse files
fix: Handle missing arguments gracefully in mypy-daemon.sh
Use ${1:-} instead of $1 to avoid error with set -u when no arguments are provided. This allows the script to show the usage message instead of erroring on the case statement. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c69a5c8 commit cf72f4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/mypy-daemon.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
99
MYPY_CACHE_DIR="${ROOT_DIR}/sdk/python/.mypy_cache"
1010
PID_FILE="$MYPY_CACHE_DIR/dmypy.pid"
1111

12-
case "$1" in
12+
case "${1:-}" in
1313
start)
1414
echo "🚀 Starting MyPy daemon..."
1515
cd ${ROOT_DIR}/sdk/python

0 commit comments

Comments
 (0)