“Could not open input file” error even when WP-CLI is in the path

Question

I’m developing WordPress locally with XAMPP, and currently trying to install the WP-CLI tools as described here using Cygwin.

I renamed wp-cli.phar to wp, made it executable and moved it to the XAMPP/php folder.

However, running wp gives me the error:

Could not open input file: /cygdrive/b/Users/User/Desktop/XAMPP/php/wp

On the other hand, doing ./wp from the directory that the file is located in runs the program without issue.

This is despite the fact that both /cygdrive/b/Users/User/Desktop/XAMPP/php and /cygdrive/b/Users/User/Desktop/XAMPP/php/wp are in my PATH, via Cygwin’s ~/.bash_profile file.

This is confirmed by doing which php:

/cygdrive/b/Users/User/Desktop/XAMPP/php/php

…and which wp:

/cygdrive/b/Users/User/Desktop/XAMPP/php/wp

What could be causing this problem?

0
Prometheus 4 months 0 Answers 15 views 0

Leave an answer