Commas cause -e to mangle the expression
durka opened this issue · 3 comments
durka commented
alexs-air-3:rust alex$ cargo script -e '[1, 2]'
Compiling expr v0.1.0 (file:///Users/alex/.multirust/toolchains/beta/cargo/.cargo/script-cache/expr-68f9e2ff5dd19fe8)
error: incorrect close delimiter: `}`
--> /Users/alex/.multirust/toolchains/beta/cargo/.cargo/script-cache/expr-68f9e2ff5dd19fe8/expr.rs:5:4
|
5 | {[1}
| ^
|
note: unclosed delimiter
--> /Users/alex/.multirust/toolchains/beta/cargo/.cargo/script-cache/expr-68f9e2ff5dd19fe8/expr.rs:5:2
|
5 | {[1}
| ^
error: aborting due to previous error
error: Could not compile `expr`.
I believe this is clap's fault; you need to call use_delimiter(false)
somewhere.
kbknapp commented
Setting use_delimiter(false)
will fix this, but I'm working to keep this from being an issue in the future as well.