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

vendor/bin/pomm.php is not a php script? #67

Open
mindplay-dk opened this issue Oct 8, 2015 · 9 comments
Open

vendor/bin/pomm.php is not a php script? #67

mindplay-dk opened this issue Oct 8, 2015 · 9 comments
Milestone

Comments

@mindplay-dk
Copy link

I've installed Pomm 2, as per instructions in "Quick Setup 2.0" on the homepage.

The installed vendor/bin/pomm.php is not a PHP script - it appears to contain a shell script?

As per that page, if I enter php vendor/bin/pomm.php, it simply outputs the contents of the shell script.

I'm on Windows, but I use Git Bash, so I am generally able to run most simple shell scripts.

@mindplay-dk
Copy link
Author

Simply entering ./vendor/bin/pomm.php works, but I believe that's because it's not actually running this through the php interpreter, but instead running it through the shell. So I guess the filename is just wrong? Probably should be just pomm not pomm.php, right?

@chanmix51
Copy link
Member

Well, we encourage windows users to report such feedback because none of use use Microsoft’s OS. On Unix like OSs, composer creates the symbolic link vendor/bin/pomm.php that points to vendor/pomm-project/cli/bin/pomm.php which is a php script, UTF-8 Unicode text executable.

This said, I have no idea why the script is not interpreted when called with the PHP CLI because there is the <?php tag even though it is preceded by the shebang #!/bin/env php (I do not know if Windows uses this).

Any clue from other Windows users ?

@mindplay-dk
Copy link
Author

@chanmix51 but there is no php tag - the contents of the file installed in vendor/bin/pomm.php is:

#!/usr/bin/env sh
SRC_DIR="`pwd`"
cd "`dirname "$0"`"
cd "../pomm-project/cli/bin"
BIN_TARGET="`pwd`/pomm.php"
cd "$SRC_DIR"
"$BIN_TARGET" "$@"

It's not a PHP script, obviously - it's named ".php", but it's clearly a shell-script?

@chanmix51
Copy link
Member

Ok, that seems to be the composer trick to circumvent the lack of symbolic link in Windows. Agree with you, the script as auto executable should not have an extension. This is not something we can really change now as it is not really a bug and this might create regression issues with scripts using this CLI tool. What do you think ?

@chanmix51
Copy link
Member

I have added a note on pomm project’s website about this. Is there something else we can do ?

@chanmix51
Copy link
Member

Can we close this ticket ?

@mindplay-dk
Copy link
Author

Flag for 3.0 maybe?

@chanmix51 chanmix51 added this to the 3.0 milestone Oct 16, 2015
@chanmix51
Copy link
Member

Wouldn't have thought about this, thank you.

@stof
Copy link

stof commented Nov 6, 2017

@chanmix51 a solution could be to provide a new bin script without extension, which would become the recommended one.
This is even better than doing the renaming in 3.0 only, as it allows to migrate progressively.

Btw, this issue should be moved to https://github.com/pomm-project/Cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants