fix: clean up flag help output (#24686)

Permission flags are unified in a clearer and concise output.
Unstable flags are hidden by default with exception of the `unstable`
flag itself. the remaining unstable flags can be seen with a
`--help=unstable`.
This also cleans up to show unstable flags only for subcommands that
actually need them.
Also sorts flags alphabetically, and gorups various flags together in a
set of categories.

---------

Co-authored-by: crowlkats <crowlkats@toaxl.com>
This commit is contained in:
Luca Casonato 2024-08-19 00:39:53 +02:00 committed by GitHub
parent 1ec12a8c5d
commit 9bc2dd29ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 1100 additions and 838 deletions

View file

@ -35,7 +35,7 @@ pub async fn execute_script(
let cli_options = factory.cli_options()?;
let start_dir = &cli_options.start_dir;
if !start_dir.has_deno_or_pkg_json() {
bail!("deno task couldn't find deno.json(c). See https://deno.land/manual@v{}/getting_started/configuration_file", env!("CARGO_PKG_VERSION"))
bail!("deno task couldn't find deno.json(c). See https://docs.deno.com/go/config")
}
let force_use_pkg_json =
std::env::var_os(crate::task_runner::USE_PKG_JSON_HIDDEN_ENV_VAR_NAME)