Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bernardini687 opened this issue May 28, 2020 · 5 comments
Closed

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

bernardini687 opened this issue May 28, 2020 · 5 comments

Comments

@bernardini687
Copy link

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! 馃憤

@umbopepato
Copy link
Member

umbopepato commented May 28, 2020

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

@bernardini687
Copy link
Author

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

@bernardini687
Copy link
Author

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!

umbopepato added a commit that referenced this issue May 29, 2020
@umbopepato
Copy link
Member

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

@bernardini687
Copy link
Author

@umbopepato yep, it's fixed! thanks a lot 馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants