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

“extract_dir” errors is actually Get-HelperPath -Helper 7zip failing #3517

Closed
rasa opened this issue Jun 19, 2019 · 3 comments
Closed

“extract_dir” errors is actually Get-HelperPath -Helper 7zip failing #3517

rasa opened this issue Jun 19, 2019 · 3 comments

Comments

@rasa
Copy link
Member

rasa commented Jun 19, 2019

We’ve received at least 5 reports:
ScoopInstaller/Main#111
ScoopInstaller/Main#120
ScoopInstaller/Main#129
ScoopInstaller/Extras#2279
ScoopInstaller/Extras#2309
that all look like this:

> scoop install mkvtoolnix
Installing 'mkvtoolnix' (34.0.0) [64bit]
Loading mkvtoolnix-64-bit-34.0.0.7z from cache
Checking hash of mkvtoolnix-64-bit-34.0.0.7z ... ok.
Extracting mkvtoolnix-64-bit-34.0.0.7z ... The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command
name, a script block, or a CommandInfo object.
At C:\Users\Hezekiah\scoop\apps\scoop\current\lib\decompress.ps1:69 char:11
+         & (Get-HelperPath -Helper 7zip) x "$Path" -o"$DestinationPath ...
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression

ERROR Could not find 'mkvtoolnix'! (error 16)

Please try again or create a new issue by using the following link and paste your console output:
https://github.com/lukesampson/scoop-extras/issues/new?title=mkvtoolnix%4034.0.0%3a+extract_dir+error

I wasn’t able to duplicate this issue, so I’m not sure how to debug it. Perhaps if we modified scoop to print out some system config information so we can see if there’s a pattern to these failures?

@rasa
Copy link
Member Author

rasa commented Jun 19, 2019

@putnik reports this issue may due to https://www.7-zip.org/ being blocked in Russia.

@niheaven suggests to fix this via:

  • Install 7-zip by yourself (e.g. from GitHub)
  • Make sure 7z.exe could be accessed from console (add the 7z.exe directory to your %PATH%)
  • Run scoop config 7ZIPEXTRACT_USE_EXTERNAL true to use the 7-zip you just installed manually.
  • All done, try re-installing the failed package again via scoop.

@darthwalsh
Copy link
Contributor

Hit this issue today setting up a new windows machine:

PS C:\Users\walshca> scoop install git
WARN  Purging previous failed installation of git.
ERROR 'git' isn't installed correctly.
Removing older version (2.44.0).
'git' was uninstalled.
Installing 'git' (2.44.0) [64bit] from main bucket
Loading PortableGit-2.44.0-64-bit.7z.exe from cache
Checking hash of PortableGit-2.44.0-64-bit.7z.exe ... ok.
Extracting dl.7z ... Invoke-ExternalCommand: C:\Users\walshca\scoop\apps\scoop\current\lib\decompress.ps1:45
Line |
  45 |      $Status = Invoke-ExternalCommand $7zPath $ArgList -LogPath $LogPa …
     |                                       ~~~~~~~
     | Cannot validate argument on parameter 'FilePath'. The argument is null or empty. Provide an argument that is not
     | null or empty, and then try the command again.

(Maybe it was caused because i was trying to run scoop from powershell.exe first, from a shell that accidentally didn't have C:\Users\walshca\scoop\shims in the path?)

Workaround was to first run scoop install 7zip

@DGrv
Copy link

DGrv commented Sep 10, 2024

I add this issue as well.
Update 7zip first.
scoop update 7zip

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

No branches or pull requests

4 participants