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

substring different on windows #1047

Merged
merged 1 commit into from
Jul 23, 2018
Merged

substring different on windows #1047

merged 1 commit into from
Jul 23, 2018

Conversation

pYr0x
Copy link
Contributor

@pYr0x pYr0x commented Jul 22, 2018

check OS and substring different on windows
close #1046

check OS and substring different on windows
@coveralls
Copy link

coveralls commented Jul 22, 2018

Coverage Status

Coverage decreased (-0.02%) to 93.627% when pulling 8a8ae25 on process-cwd-windows into fc90410 on master.

@@ -17,6 +18,9 @@ function treeshake(data) {
let getNode = id => data.graph[id];
let mains = uniq(data.mains.concat(data.loader.bundle));
let cwd = process.cwd().substr(1);
if (os.type().toLowerCase() === "windows_nt"){
Copy link
Member

Choose a reason for hiding this comment

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

Is this the best way to check if it's windows? In the past I've used process.platform === 'win32'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Ok, I'd think either will work then.

@matthewp matthewp merged commit f427e3d into master Jul 23, 2018
@matthewp matthewp deleted the process-cwd-windows branch July 23, 2018 16:47
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.

process.cwd substring modules falsely on windows
3 participants