jurassiscripts / velociraptor

The npm-style script runner for Deno

Home Page:https://velociraptor.run

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

possible non wanted error [ERROR:vr] Unknown option: -1

bernardini687 opened this issue Β· comments

hello πŸ‘‹

i was successfully running deno scripts through velociraptor, like so:

vr add foo 100

which maps to:

deno run --allow-env --allow-read --allow-write add.ts

add.ts is supposed to read Deno.args and do something with them.


the problem with velociraptor appeared when i ran:

vr add foo -100

which failed with [ERROR:vr] Unknown option: -1.
that's okay, it looks like an option and it's not a valid one.

but then i tried to wrap the value in quotes:

vr add foo "-100"

and got the same error.


now, it's not at all critical.
but when i ran the whole command manually, i got it working (with or without quotes):

$ deno run --allow-env --allow-read --allow-write add.ts foo -1000

so it's just something i wanted to point out
thanks for the good work on velociraptor! πŸ‘

Hi @bernardini687, thanks for reporting this.
What version of velociraptor are you using?
This is probably caused by #26

using 1.0.0-beta.6.
i will update asap and let you know if it works, thanks.

yep, the upgrade solved the problem with arguments like:

vr add foo -100

but, now i'd still report another possible problem with quoted params:

vr add "foo bar" -100
# Deno.args log -> ["foo", "bar", "-100"]

deno run --allow-all add.ts "foo bar" -100
# Deno.args log -> ["foo bar", "-100"]

it seems that what should be passed as a single string is instead splitted by velociraptor!

@bernardini687 you're right, I didn't have the time to test this properly. Should be now fixed in beta.9 though

@umbopepato yep, it's fixed! thanks a lot πŸ‘