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

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.

@gziolo gziolo added [Type] Developer Documentation Documentation for developers [Type] Build Tooling Issues or PRs related to build tooling labels Nov 4, 2019
Copy link
Member

@oandregal oandregal left a comment

Choose a reason for hiding this comment

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

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!

@oandregal oandregal merged commit 9a839de into WordPress:master 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
Labels
[Type] Build Tooling Issues or PRs related to build tooling [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants