Open schellingerhout opened 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.
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
To reproduce the issue:
C:\Users\_UserName_\.config\how-to-npm\cwd
file is createdcd
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)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?