workshopper / how-to-npm

A module to teach you how to module.
https://www.npmjs.com/package/how-to-npm
ISC License
1.12k stars 221 forks source link

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

Open schellingerhout opened 7 years ago

schellingerhout commented 7 years ago

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:

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 commented 7 years ago

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.