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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NimScript] Error: arguments can only be given if the '--run' option is selected #9246

Closed
Wh1teDuke opened this Issue Oct 8, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@Wh1teDuke
Copy link
Contributor

Wh1teDuke commented Oct 8, 2018

When passing arguments to a nim script in the form of nim task script argA argB without actually compiling any file, nim will print:
Error: arguments can only be given if the '--run' option is selected.

If this is the intended behavior, then it would make a nice addition to be able to pass arguments to nimscript tasks without compiling anything later.


>nim -v
Nim Compiler Version 0.19.0 [Linux: i386]
Compiled at 2018-09-27
Copyright (c) 2006-2018 by Andreas Rumpf

git hash: 72e15ff739cc73fbf6e3090756d3f9cb3d5af2fa
active boot switches: -d:release
@Wh1teDuke

This comment has been minimized.

Copy link
Contributor

Wh1teDuke commented Oct 9, 2018

Only happens when the script file is indicated without the extension ('script' instead of 'script.nims')

Wh1teDuke added a commit to Wh1teDuke/Nim that referenced this issue Oct 9, 2018

Acknowledge nimscripts not ending in '.nims'
Acknowledge when a script file is executed without the '.nims' extension. Previously it would execute it and pretend it wasn't one.

Fixes nim-lang#9246

Wh1teDuke added a commit to Wh1teDuke/Nim that referenced this issue Oct 9, 2018

Acknowledge nimscripts not ending in '.nims'
Acknowledge when a script file is executed without the '.nims' extension. Previously it would execute it and pretend it wasn't one.

Fixes nim-lang#9246

@Araq Araq closed this in 73c3062 Nov 6, 2018

narimiran added a commit that referenced this issue Nov 24, 2018

Nimscript: fixes #9246 [backport]
(cherry picked from commit 73c3062)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment