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

Use path.join to concatenate paths to support Windows extended-length paths #201

Merged
merged 1 commit into from
May 20, 2020
Merged

Use path.join to concatenate paths to support Windows extended-length paths #201

merged 1 commit into from
May 20, 2020

Conversation

charlespierce
Copy link
Contributor

Closes #200

Info

Windows extended-length paths don't support / as a path separator, so building a path using string concatenation will fail if the path is extended-length. This causes gulp to fail if it is invoked with an extended-length path, since that causes __dirname to be extended-length.

Changes

Updated the path building in index.js to use path.join()

Tested

Invoked gulp -v using an extended-length path and verified that it runs correctly and doesn't throw an error.

@phated
Copy link
Member

phated commented Oct 30, 2019

This is my favorite kind of bug report (especially coming with a fix!).

Do you know of any way that we can test for this regression on appveyor?

@charlespierce
Copy link
Contributor Author

@phated I'm not sure of a way to run the command in AppVeyor. I tested it locally by running node \\?\C:\path\to\gulp-cli\bin\gulp-cli.js, so it would likely need something similar. I don't know if it's possible to get an extended-length path from AppVeyor settings, however.

@phated
Copy link
Member

phated commented May 20, 2020

I'm going to get this merged for the next release. I'm really sorry it stalled for so long (lots os stuff has been happening in life 😬).

Ideally, I'd like to get a regression test added but I'll open an issue for that and CC you. Thanks for your contribution!

@phated phated merged commit 8570b0c into gulpjs:master May 20, 2020
@phated
Copy link
Member

phated commented May 20, 2020

Thanks for hanging in there! I know it's hard to stay motivated when we take awhile to respond. I'm going to get this out tonight once CI finishes.

@charlespierce charlespierce deleted the windows_extended_path branch May 20, 2020 16:49
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.

Gulp CLI fails with Windows Extended-Length Path
2 participants