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

Incorrectly reports wrong folder on windows due to case sensitivity #111

Open
schellingerhout opened this issue Mar 4, 2017 · 1 comment

Comments

@schellingerhout
Copy link
Contributor

schellingerhout commented Mar 4, 2017

On Windows cd with a fully qualified name will list the Current Working Directory with the correct case for the folders (regardless of how the case was typed). However, the drive letter receives the case as typed.

This may cause a false failure of a mismatched path compared to the cwd file checked in the lesson

Uh oh!
It looks like you are in the wrong folder.

To reproduce the issue:

  • Complete lessons up to the point where C:\Users\_UserName_\.config\how-to-npm\cwd file is created
  • If you are already in the working folder then cd to any other folder.
  • cd back to the working folder (the one containing .npmrc) using a fully qualified path, but this time change the case of the drive letter (the case of the rest of the path does not matter)
  • run how-to-npm verify

Folders cannot be checked case-insensitive on other platforms, but the issue here seems to be limited to just the driver letter on Windows. Perhaps checking for a Windows style drive letter and handling in a special case?

@schellingerhout
Copy link
Contributor Author

To help with this problem I created a package same-path, and published thanks to this very tutorial.

More testing required, but initial manual tests work fine on Ubuntu and Windows, plus it resolves relative paths.

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

No branches or pull requests

2 participants