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

Fix getting download dir name for develop #952

Merged
merged 3 commits into from
Dec 3, 2021

Conversation

bobeff
Copy link
Contributor

@bobeff bobeff commented Oct 11, 2021

When getting the download directory name for a package that we want to put in develop mode, a trailing slash in the URL or the subdir leads to getting an empty string. To fix the problem we remove the trailing slash from them at the start of the getDevelopDownloadDir procedure.

When getting the download directory name for a package that we want to
put in develop mode, a trailing slash in the URL or the subdir leads to
getting an empty string. To fix the problem we remove the trailing slash
from them at the start of the `getDevelopDownloadDir` procedure.
Copy link
Collaborator

@dom96 dom96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. But can we get some quick assert tests to test getDevelopDownloadDir?

The `getDevelopDownloadDir` procedure is moved in the `download.nim`
module and units tests for it are added.
Fix the `getDevelopDownloadDir` procedure tests on Windows by adding
normalization of the expected paths.
@bobeff
Copy link
Contributor Author

bobeff commented Nov 10, 2021

Makes sense. But can we get some quick assert tests to test getDevelopDownloadDir?

@dom96 Done.

@narimiran narimiran merged commit 0777f33 into nim-lang:master Dec 3, 2021
@bobeff bobeff deleted the bugfix/incorrect-download-dir branch December 6, 2021 11:33
CyberTailor pushed a commit to CyberTailor/nimble that referenced this pull request Dec 12, 2021
* Fix getting download dir name for develop

When getting the download directory name for a package that we want to
put in develop mode, a trailing slash in the URL or the subdir leads to
getting an empty string. To fix the problem we remove the trailing slash
from them at the start of the `getDevelopDownloadDir` procedure.

* Add tests for the `getDevelopDownloadDir` proc

The `getDevelopDownloadDir` procedure is moved in the `download.nim`
module and units tests for it are added.

* Fix the tests on Windows

Fix the `getDevelopDownloadDir` procedure tests on Windows by adding
normalization of the expected paths.
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

Successfully merging this pull request may close these issues.

None yet

3 participants