Fix: catch unknown flags in session command before API request
Previously, invalid flags like --invalid-flag were silently ignored, causing the CLI to make API requests that returned confusing 'timestamp expired' errors. Now prints 'Unknown option' and exits. Fixed in 21 implementations: rb, pl, php, lua, sh, cpp, d, rs, zig, v, kt, groovy, dart, cr, raku, ps1, m, nim, hs
This commit is contained in:
parent
c6813e5a18
commit
35b3ab615a
19 changed files with 100 additions and 17 deletions
|
|
@ -711,7 +711,10 @@ def parseArgs(argv) {
|
|||
args.keyExtend = true
|
||||
break
|
||||
default:
|
||||
if (!argv[i].startsWith('-')) {
|
||||
if (argv[i].startsWith('-')) {
|
||||
System.err.println("${RED}Unknown option: ${argv[i]}${RESET}")
|
||||
System.exit(1)
|
||||
} else {
|
||||
args.sourceFile = argv[i]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue