Repository: deno
Issue: Panic when argument contains invalid utf-8
Labels: bug,cli

<table><tr><th scope=col>command (bash)</th><th scope=col>output</th></tr><tr><td><pre lang=bash>deno --version</pre></td><td><pre>deno 1.41.2 (release, x86_64-unknown-linux-gnu)
v8 12.1.285.27
typescript 5.3.3</pre></td></tr><tr><td><pre lang=bash>DENO_UNSTABLE_BYONM=$'\xEE' deno</pre></td><td><pre>error: invalid UTF-8 was detected in one or more arguments
&#10;Usage: deno [OPTIONS] [COMMAND]
&#10;For more information, try '--help'.</pre></td></tr><tr><td><pre lang=bash>deno $'\xEE'</pre></td><td><pre>============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
&#10;Platform: linux x86_64
Version: 1.41.2
thread panicked while processing panic. aborting.
Aborted (core dumped)</pre></td></tr><tr><td><pre lang=bash>RUST_BACKTRACE=1 deno $'\xEE'</pre></td><td><pre>============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
&#10;Platform: linux x86_64
Version: 1.41.2
thread panicked while processing panic. aborting.
Aborted (core dumped)</pre></td></tr></table><hr>also I can't find <code>invalid UTF-8 was detected in one or more arguments</code> inside any files inside <a href=https://github.com/denoland/deno/releases/download/v1.41.2/deno_src.tar.gz>https://github.com/denoland/deno/releases/download/v1.41.2/deno_src.tar.gz</a> but it is inside <a href=https://github.com/denoland/deno/releases/download/v1.41.2/deno-x86_64-unknown-linux-gnu.zip><code>deno</code> executable</a>:<pre lang=console>$ strings deno | grep --fixed-strings 'invalid UTF-8 was detected in one or more arguments'
 a similar  exists: ' exists:  some similar s exist: one of the values isn't valid for an argumentunexpected argument foundunrecognized subcommandequal is needed when assigning values to one of the argumentsinvalid value for one of the argumentsunexpected value for an argument foundmore values required for an argumenttoo many or too few values for an argumentan argument cannot be used with one or more of the other specified argumentsone or more required arguments were not provideda subcommand is required but one was not providedinvalid UTF-8 was detected in one or more arguments/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.17/src/error/mod.rsto pass '' as a value, use '-- subcommand '' exists; to use it, remove the '' before it/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.17/src/parser/arg_matcher.rsMismatch between definition and access of ``. /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.4.17/src/parser/error.rsCould not downcast to , need to downcast to Unknown argument or group id.  Make sure you are using the argument id and not the short or long flags</pre>so error is not contiguous string inside source code or is inside dependency