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

Composer detection problem if composer is wrapped in a shell script #424

Open
c33s opened this issue Feb 3, 2024 · 2 comments
Open

Composer detection problem if composer is wrapped in a shell script #424

c33s opened this issue Feb 3, 2024 · 2 comments

Comments

@c33s
Copy link

c33s commented Feb 3, 2024

os: debian12
symfony: 5.8.6
composer: 2.6.6

my composer file is a shell script which is doing different stuff for me before actually running composer. so i there is the bash script /usr/local/bin/composer which runs the actual composer file /usr/local/bin/composer-bin

shouldn't a simple detection be enough?

command -v composer
/usr/local/bin/composer

which composer
/usr/local/bin/composer
@tucksaun
Copy link
Contributor

tucksaun commented Feb 7, 2024

shouldn't a simple detection be enough?

unfortunately no as we might need to change PHP version or settings before running composer. to do so we need to "basically" run php ... /usr/local/bin/composer which is not possible with a shell wrapper.

we do have support for php wrappers though so if your script starts with #!/usr/bin/env php it will work.

@c33s
Copy link
Author

c33s commented Feb 8, 2024

sadly it is a bash script and has to be a bash script, it would also feel wrong to translate a bash script which is running regular shell commands to php and having a lot of exec function calls. i assume it won't work if it is a bash script, will it?

would it be possible to add a environment variable which sets the composer path so that symfony-cli is not trying to detect it? or is there any other workaround so that symfony-cli is not working around my script?

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

No branches or pull requests

2 participants