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

Fix: correctly check paths when running scaffold command for themes and plugins from outside directory. #307

Closed

Conversation

NielsdeBlaauw
Copy link

@NielsdeBlaauw NielsdeBlaauw commented Jun 2, 2022

parent_dir contains a normalized path whereas WP_CONTENT_DIR contains a relative path. By running the WP_CONTENT_DIR through realpath we get a path we can actually compare between the target dir and where we want to place the new theme.

Fixes #263
Also fixes #251

henrywright and others added 30 commits October 4, 2018 15:08
The `wp-i18n` node module has some PHP that gets flagged.
Allow for `installation` as well as `install`
Ignore 'node_modules' in PHPCS XML file
When the request fails on HTTPS, we switch to HTTP instead, which should work within Travis.

Fixes wp-cli#181
…ssue

Work around Travis CI issue with _s download certificate
Missing text domain in post_type_extended.mustache
…E is wordpress-0.0-beta1 or wordpress-0.0-RC1
…-block

Add textdomain to block js strings and Update test accordingly
…upport-beta-rc

In the case of RC and Beta, use Branch for WP_TEST_TAG.
Doing so ensures environment variables are passed through and avoids
cryptic build failures.
Run `docker-php-ext-install` with `sudo -E` in CircleCI
Split up the list of expected files to allow for WP 5.0+ changes
Specifically:
* `.babelrc`
* `.eslintignore`
* `.eslintignore`
* `.eslintignore`
Ignore various JavaScript config files in plugin `.distignore`
schlessera and others added 24 commits September 2, 2021 15:08
Allow for diverging PHPUnit version specifics in tests
parent_dir contains a normalized path whereas  WP_CONTENT_DIR contains a relative path. By running the WP_CONTENT_DIR through realpath we get a path we can actually compare between the target dir and where we want to place the new theme.

Also fixes wp-cli#251
@NielsdeBlaauw NielsdeBlaauw requested a review from a team as a code owner June 2, 2022 11:40
@NielsdeBlaauw NielsdeBlaauw changed the title Fixes #263. Fix: correctly check paths when running scaffold command for themes and plugins from outside directory. Jun 2, 2022
@janw-me
Copy link
Member

janw-me commented Jun 6, 2022

If I remember correctly the tests failed from the start right?

@danielbachhuber
Copy link
Member

Proceeding with wp-cli/wp-cli#5594 for this repository. I've captured this PR to https://gist.github.com/danielbachhuber/2951826b5cee4db3c8245ff095d5b7de in case this PR is auto-closed or broken in some way.

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.

child-theme throws an error if the --path argument is set Invalid theme slug specified. The target directory