Skip to content

Panic when supplying URL to --unsafely-ignore-certificate-errors #30513

@0kku

Description

@0kku

Platform: windows x86_64
Version: 2.4.5

Running: deno run --unsafely-ignore-certificate-errors=https://example.com/
Causes Deno to panic:

thread 'main' panicked at cli\args\flags.rs:6275:58:
called `Result::unwrap()` on an `Err` value: ErrorInner { kind: InvalidValue, context: FlatMap { keys: [], values: [] }, message: Some(Raw("invalid value 'https://example.com/': URLs are not supported, only domains and ips")), source: None, help_flag: None, styles: Styles { header: Style { fg: None, bg: None, underline: None, effects: Effects() }, error: Style { fg: None, bg: None, underline: None, effects: Effects() }, usage: Style { fg: None, bg: None, underline: None, effects: Effects() }, literal: Style { fg: None, bg: None, underline: None, effects: Effects() }, placeholder: Style { fg: None, bg: None, underline: None, effects: Effects() }, valid: Style { fg: None, bg: None, underline: None, effects: Effects() }, invalid: Style { fg: None, bg: None, underline: None, effects: Effects() } }, color_when: Never, color_help_when: Never, backtrace: None }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Maybe a cleaner error message regarding lack of support for URLs would be in order? Ideally, it would suggest rerunning with --unsafely-ignore-certificate-errors=example.com instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions