It seems that commands in help don't render correctly with Deno. Specifically, they don't show the file name and they also don't work with a compiled executable.
For example, with the following file,
// minimum-cli.ts
import yargs from "https://deno.land/x/yargs@v17.2.1-deno/deno.ts";
yargs(Deno.args)
.command("my-command")
.strict()
.parse()
I get the following help screen:
$ deno run minimum-cli.ts --help
Check file:///Users/audrow/Code/minimum-cli.ts
deno run [command]
Commands:
deno run my-command
Options:
--help Show help [boolean]
--version Show version number [boolean]
For my-command, it should say deno run minimum-cli.ts my-command, instead of deno run my-command.
It is also true that this doesn't work correctly when Deno is compiled. For example:
$ deno compile --output out minimum-cli.ts
Check file:///Users/audrow/Code/minimum-cli.ts
Bundle file:///Users/audrow/Code/minimum-cli.ts
Compile file:///Users/audrow/Code/minimum-cli.ts
Emit out
$ ./out --help
deno run [command]
Commands:
deno run my-command
Options:
--help Show help [boolean]
--version Show version number [boolean]
In the compiled case, the command should say ./out my-command.
I am using Deno version 1.15.2 on Mac OS Monterey.
It seems that commands in help don't render correctly with Deno. Specifically, they don't show the file name and they also don't work with a compiled executable.
For example, with the following file,
I get the following help screen:
For
my-command, it should saydeno run minimum-cli.ts my-command, instead ofdeno run my-command.It is also true that this doesn't work correctly when Deno is compiled. For example:
$ deno compile --output out minimum-cli.ts Check file:///Users/audrow/Code/minimum-cli.ts Bundle file:///Users/audrow/Code/minimum-cli.ts Compile file:///Users/audrow/Code/minimum-cli.ts Emit out $ ./out --help deno run [command] Commands: deno run my-command Options: --help Show help [boolean] --version Show version number [boolean]In the compiled case, the command should say
./out my-command.I am using Deno version 1.15.2 on Mac OS Monterey.