denon icon indicating copy to clipboard operation
denon copied to clipboard

-A flag (--config flag?) doesn’t work

Open brainkim opened this issue 5 years ago • 5 comments

Describe the bug

denon run -A --config tsconfig.json main.ts

The above command will error:

[!] [conf] unsupported configuration `-A`

If I remove the -A flag the above command will error:

[!] [conf] unsupported configuration `--config`

To Reproduce Run the command.

Expected behavior All flags passed to denon work like deno.

Configuration or Project If applicable, add your denon configuration file or project so we can accurately test our solution.

Screenshots If applicable, add screenshots to help explain your problem.

Setup (Edited for upgrade)

  • OS: macOS mojave 10.14.6
  • Deno version: 1.3.0
  • Denon version: 2.3.2-master

Additional context Sorry if this was solved already, just wanted to log it while I was crawling the information superhighway.

brainkim avatar Aug 19 '20 06:08 brainkim

You are on a previous version of denon (2.3.1), you should probably upgrade to the latest version (denon --upgrade).

If the error persist please let me know 🌈

notfilippo avatar Aug 19 '20 09:08 notfilippo

Hmmm. I upgraded denon and deno to latest. It still happens but my initial reproduction is incorrect. I’m using both the -A flag and --config flag. If I use the --config flag it marks the --config flag as unknown. If I use the -A flag before the config flag it marks the -A flag as unknown instead.

Maybe the issue is that the --config flag is not supported. I’m currently just noodling around with some stuff, if you need a full reproduction I’ll try to get it to you.

brainkim avatar Aug 19 '20 18:08 brainkim

I have some idea:

  • --config flag conflict with --config flag of deno, we can change to another name for config or ignore --config flag if no command (use for others option)
  • --version flag must be show deno's version too

hong4rc avatar Dec 07 '20 13:12 hong4rc

1bd29294bfc2c1b05f2615151b20fecbe9285979

@eliassjogreen Can you revert the check option in that commit?

I think we only allow the option if it is the first argument. image

hong4rc avatar Dec 07 '20 15:12 hong4rc

Create a pr for it if you want it reverted as i don't really know what exactly you want done. This issue should really be resolved by renaming denons --config flag to something like denon-config or we could do something which would be kinda hard but smart which is to just look at the provided config and if it looks like a denon config treat it as such otherwise revert back to using it as a tsconfig

eliassjogreen avatar Dec 07 '20 15:12 eliassjogreen