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

Already on GitHub? Sign in to your account

Run can work without additional option if only one bin in .nimble #761

Merged
merged 7 commits into from Jan 17, 2020

Conversation

@inv2004
Copy link
Contributor

inv2004 commented Jan 9, 2020

if you have only one bin in .nimble.

before:
you have to specific executable every time: nimble run my_tool

after PR:
you can just: nimble run

additional fix:
before:
windows parsed empty option not correct => ".exe"

after PR:
it will raise correct exception "Please specify a binary to run" if binary not defined in opts or config

Alexander Epifanov added 2 commits Jan 9, 2020
Alexander Epifanov
@dom96
dom96 approved these changes Jan 10, 2020
Copy link
Member

dom96 left a comment

Looks good. Could we get some tests as well?

Alexander Epifanov
@inv2004

This comment has been minimized.

Copy link
Contributor Author

inv2004 commented Jan 10, 2020

@dom96
Thank you for pointing me to the tests. It helped me to find another problem of passing parameters to the "default" binary.

I added "--" parameter to replace default executable if it is necessary

For example:

nimble run --debug           // default binary works fine
nimble run --debug check     // it thinks that we set "check" to binary, but it is not correct
nimble run -- --debug check  // fix for previous problem
src/nimblepkg/options.nim Outdated Show resolved Hide resolved
Alexander Epifanov added 4 commits Jan 10, 2020
Alexander Epifanov
Alexander Epifanov
Alexander Epifanov
@dom96
dom96 approved these changes Jan 17, 2020
Copy link
Member

dom96 left a comment

Epic. Thanks!

@dom96 dom96 merged commit 9391fbc into nim-lang:master Jan 17, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.