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

Misleading message about 7z command #9994

Closed
enumag opened this issue Jul 9, 2021 · 4 comments
Closed

Misleading message about 7z command #9994

enumag opened this issue Jul 9, 2021 · 4 comments
Labels
Milestone

Comments

@enumag
Copy link
Contributor

enumag commented Jul 9, 2021

I got this message from composer:

As there is no 'unzip' nor '7z' command installed zip files are being unpacked using the PHP zip extension.
This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost.
Installing 'unzip' or '7z' may remediate them.

The 7z command however does exist in the system - I ran apt-get install p7zip-full to get it.

After checking composer's source code it seems that 7z is only checked for on Windows but ignored on linux. So on linux I actually have to install unzip.

The message is highly misleading this way. Either it shouldn't mention 7z or 7z should be accepted on any platform.

@Seldaek Seldaek added this to the 2.1 milestone Jul 12, 2021
@Seldaek Seldaek added the Bug label Jul 12, 2021
@enumag
Copy link
Contributor Author

enumag commented Jul 12, 2021

@Seldaek I suspect this closes #9951 as well, right?

@Seldaek
Copy link
Member

Seldaek commented Jul 12, 2021

Hmm right, I thought there was something already.. I guess we need to look up 7zz too then.

@MightyPork
Copy link

Is this really fixed? I just saw this warning in composer 2.3.1 with both unzip and 7z installed on Arch Linux, in the standard path, /usr/bin. Where is composer trying to find them?

Screenshot_20220426_174417

Screenshot_20220426_174442

@Seldaek
Copy link
Member

Seldaek commented Apr 27, 2022

@MightyPork try with latest Composer perhaps, but also check your PATH is correct when running php/composer? It essentially looks up in the PATH.

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

No branches or pull requests

3 participants