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

Update BinaryInstaller.php #11557

Merged
merged 1 commit into from Jul 19, 2023
Merged

Update BinaryInstaller.php #11557

merged 1 commit into from Jul 19, 2023

Conversation

fr3nch13
Copy link
Contributor

https://github.com/composer/composer/blob/68b7a07187a62435e514324052d5a649b6662efb/src/Composer/Installer/BinaryInstaller.php#L404C4-L404C4

Change "\${dir}/$binFile" "\$@"
To sh "\${dir}/$binFile" "\$@"

The file being referenced by "\${dir}/$binFile" "\$@" isn't always chmod +x so in situation like running in gitlab-ci workflows, it throwing a Permission Denied error.

https://github.com/composer/composer/blob/68b7a07187a62435e514324052d5a649b6662efb/src/Composer/Installer/BinaryInstaller.php#L404C4-L404C4

Change `"\${dir}/$binFile" "\$@"`
To `sh "\${dir}/$binFile" "\$@"`

The file being referenced by `"\${dir}/$binFile" "\$@"` isn't always chmod +x so in situation like running in gitlab-ci workflows, it throwing a Permission Denied error.
@Seldaek Seldaek added this to the 2.6 milestone Jul 19, 2023
@Seldaek Seldaek merged commit c1f2964 into composer:main Jul 19, 2023
17 of 18 checks passed
@Seldaek
Copy link
Member

Seldaek commented Jul 19, 2023

Thanks

@fr3nch13
Copy link
Contributor Author

This may also need to be changed for the 2.2 branch.

@Seldaek
Copy link
Member

Seldaek commented Jul 19, 2023

Yes true, tagged it as such, thanks

Seldaek added a commit that referenced this pull request Sep 1, 2023
@Seldaek
Copy link
Member

Seldaek commented Sep 1, 2023

I had to revert this due to #11612 - I didn't realize this would take over the default shell but indeed this seems like a bad idea, and as this is just a hack to fix a misconfiguration I think it'd be best that you properly set the execute bit on your executable files instead.

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

Successfully merging this pull request may close these issues.

None yet

2 participants