Skip to content

Commit 76ac76e

Browse files
committed
Add error handling for 'mfc run' syntax
Address AI review feedback: prevent 'mfc run run case.py' issue by detecting and rejecting the 'run' subcommand with a helpful error message. If users try 'mfc run case.py', they now get: mfc (Homebrew): The 'run' command is not needed. Usage: mfc <case.py> [options] Example: mfc case.py -n 2
1 parent 5fecd1b commit 76ac76e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packaging/homebrew/mfc.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ def install
114114
exit 0
115115
fi
116116
117+
# Check if user accidentally used 'mfc run' syntax
118+
if [[ "${ARGS[0]}" == "run" ]]; then
119+
echo "mfc (Homebrew): The 'run' command is not needed."
120+
echo "Usage: mfc <case.py> [options]"
121+
echo "Example: mfc case.py -n 2"
122+
exit 2
123+
fi
124+
117125
# Always prepend "run" since this wrapper only supports running cases
118126
ARGS=("run" "${ARGS[@]}")
119127

0 commit comments

Comments
 (0)