-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add path case-insensitivity if onlyChanged option is active, fixes #4644 #4730
Changes from 9 commits
78dadae
c47755f
af59143
b1c3f48
f3f4466
ed855fc
f6350d1
4c82bb5
aa941c6
a0157e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,16 @@ const getProjectListFromCLIArgs = (argv, project: ?Path) => { | |
projects.push(project); | ||
} | ||
|
||
if (!projects.length && process.platform === 'win32') { | ||
try { | ||
// $FlowFixMe | ||
projects.push(process.binding('fs').realpath(process.cwd())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fs.realpathSync() does not correct the path. They differ:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Huh, that's weird There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I understand it correctly There is a PR, which should expose |
||
} catch (err) { | ||
// do nothing, just catch error | ||
// process.binding('fs').realpath can throw, e.g. on mapped drives | ||
} | ||
} | ||
|
||
if (!projects.length) { | ||
projects.push(process.cwd()); | ||
} | ||
|
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.
can we do
const filePath = fileOrPath.split(path.posix.sep);
here? (or justfileOrPath.split('/')
)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 suggestion. Changed to
const filePath = fileOrPath.split('/')