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

Escape spaces in file paths #18253

Merged

Conversation

@MarkMarzeotti
Copy link
Contributor

MarkMarzeotti commented Nov 3, 2019

Description

I came across an issue trying to commit for the first time at contributor day. Further up in my file tree I have a folder name with a space in it. npm install seemed to run fine, but when I tried to commit, the docs:build process was not able to run as it could not find the proper file path. Where the file path is created, this PR replaces the space with an escaped space.

CC: @aduth - thanks for your help with this!

How has this been tested?

Gutenberg plugin cloned and installed with a space in the path prior to the WordPress instance. My file path was /Users/mmarzeotti/Local Sites/contribute/app/public/wp-content/plugins/gutenberg/docs/tool/update-data.js for reference. Run npm run docs:build and it will be unable to find the files necessary to run. When spaces are escaped, the command runs as it should.

Types of changes

The same change (replace space with escaped space) is made in two places referencing docgen.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
Copy link
Member

nosolosw left a comment

Hey @MarkMarzeotti thanks for the contribution! I'm sorry it took me so long to review (I was AFK).

I confirm I could repro the bug and this fixes it. Let's merge this in!

@nosolosw nosolosw merged commit 9a839de into WordPress:master Nov 19, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
mkevins added a commit that referenced this pull request Nov 19, 2019
@youknowriad youknowriad added this to the Gutenberg 7.0 milestone Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.