-
Notifications
You must be signed in to change notification settings - Fork 188
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
Fix create directory behavior #983
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs some tests, any chance you could add some? :)
Co-authored-by: Dominik Picheta <[email protected]>
I don't know how to add tests to nimble. It would be something like this as shell script:
|
Lots of examples in here https://github.com/nim-lang/nimble/tree/master/tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the test! Once the CI passes this is good to go.
tests/tinitcommand.nim
Outdated
let tempdir = installDir / "a-b" | ||
createDir(tempdir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want to use getTempDir here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. How do I pass CI tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you've got warnings in your changes: https://github.com/nim-lang/nimble/runs/5265139850?check_suite_focus=true#step:6:221
@dom96 not merged yet? |
Before this fix,
nimble init
will create a new directory if current directory name isa-b
, because the inferred package name isa_b
.This fixed the behavior to align with what was in #503, so
nimble init
will never create a new directory.