Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wp-now: Fix php cli path error in dev mode (#75)
<!-- Thanks for contributing to WordPress Playground Tools! --> Fixes #16 ## What? <!-- In a few words, what is the PR actually doing? Include screenshots or screencasts if applicable --> I get an error when I use wp-now in development mode, symlinked using the `npm link`, and try executing the PHP script in the current directory. ## Why? <!-- Why is this PR necessary? What problem is it solving? Reference any existing previous issue(s) or PR(s), but please add a short summary here, too --> `wp-now php` should work in both cases consistently. ## How? <!-- How is your PR addressing the issue at hand? What are the implementation details? --> PR adds a code that replaces the second argument with its absolute version if the absolute version exists in the filesystem. ## Testing Instructions 1. Create a hello world PHP script 2. Run it with an absolute path ``` $ wp-now php /Volumes/Sites/vip-directory/test.php ``` 3. Run it using the relative path ``` $ wp-now php test.php ``` Test both cases for wp-now installed using npm and for wp-now symlinked using `npm link`.
- Loading branch information