When wp-cli.phar is renamed to wp and moved into a path location, --path option seems to have conflict with wp create command. This has been reported before (#31)
Describe how other contributors can replicate this bug
a list of
steps to replicate
the error condition
$ curl -Lso ~/.local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
$ chmod +x ~/.local/bin/wp
$ wp core download --path=subfolder
Downloading WordPress 5.9 (en_US)...
md5 hash verified: b2ed7e1e6cf834564273f5b4581afd29
Success: WordPress downloaded.
$ wp config create --path=subfolder --dbname=mydb --dbuser=myuser --dbpass=mypass --skip-check --force
PHP Warning: file_get_contents(phar://wp-cli.phar/vendor/wp-cli/wp-cli/templates/phar://.local/bin/wp/vendor/wp-cli/config-command/templates/wp-config.mustache): failed to open stream: phar error: "vendor/wp-cli/wp-cli/templates/phar:/.local/bin/wp/vendor/wp-cli/config-command/templates/wp-config.mustache" is not a file in phar "wp-cli.phar" in phar:///home/interface/.local/bin/wp/vendor/wp-cli/wp-cli/php/utils.php on line 577
Error: Could not create new 'wp-config.php' file.
However, with just a cd to the subfolder, it works just fine:
Bug Report
Describe the current, buggy behavior
When wp-cli.phar is renamed to wp and moved into a path location, --path option seems to have conflict with wp create command. This has been reported before (#31)
Describe how other contributors can replicate this bug
However, with just a cd to the subfolder, it works just fine:
Also, if I rename wp to wp-cli.phar, it works:
Describe what you would expect as the correct outcome
Let us know what environment you are running this on