mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
ca9ba87d99
Fix #20022, fix #19627 (duplicate) #17333 upgraded clap from version 3.1 to version 4. clap version 3.2.0 (intentionally) broke a behavior that deno was relying on to make `deno run --v8-flags=--help` work without specifying a file, see clap-rs/clap#3793. The workaround was to make the script argument required _unless_ `--v8-flags` is present. This broke the expectation that all successfully parsed `run` commands have the script argument set, leading to the panic on `matches.remove_many::<String>("script_arg").unwrap()`. Clap, as far as I was able to find out, does not currently offer a neat solution to this problem. This PR adds logic to create and return a custom clap error when a parsed run command does not have the script argument. I added an appropriate test. |
||
---|---|---|
.. | ||
config_file.rs | ||
flags.rs | ||
flags_net.rs | ||
import_map.rs | ||
lockfile.rs | ||
mod.rs | ||
package_json.rs |