scaffold-command icon indicating copy to clipboard operation
scaffold-command copied to clipboard

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

Open NielsdeBlaauw opened this issue 2 years ago • 1 comments

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

NielsdeBlaauw avatar Jun 02 '22 11:06 NielsdeBlaauw

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

janw-me avatar Jun 06 '22 15:06 janw-me

Proceeding with https://github.com/wp-cli/wp-cli/issues/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.

danielbachhuber avatar Nov 18 '22 16:11 danielbachhuber