denon icon indicating copy to clipboard operation
denon copied to clipboard

fix: get the correct option

Open hong4rc opened this issue 5 years ago • 4 comments

Relate #92

  • Remove exactly option in args instead of args[0] (use Array.protpty.splice to remove)
  • Chang option --config, '-c' to --cfg (conflict option with deno)
  • Fixed wrong version for --upgrade: --upgrade latest become latest instead of vlates

Old parseArgs(["--cfg", "config.json"]): image

Old parseArgs(["--upgrade", "latest"]): image

Test #92: deno install -n denon2 -qAf --unstable https://raw.githubusercontent.com/hong4rc/denon/option/denon.ts

and call denon2 run -A --config tsconfig.json main.ts

and got:

[!] [#0] starting --config tsconfig.json main.ts

hong4rc avatar Dec 07 '20 16:12 hong4rc

@eliassjogreen Are you want to use this or force --config is the first argument?

hong4rc avatar Dec 18 '20 04:12 hong4rc

Sorry for taking so long, whats your thought on this @qu4k?

eliassjogreen avatar Jan 06 '21 15:01 eliassjogreen

Is this repo not being maintained? If not are there forks with activity and response/feedback from the developers?

aadamsx avatar Feb 26 '21 01:02 aadamsx

I don't know if this PR is still relevant but I would advise against merging in this state. .splice() mutates an array, but Deno.args is immutable and Deno errors if you try to mutate it.

nnmrts avatar Nov 23 '21 06:11 nnmrts