dfinke / InstallModuleFromGitHub

Install PowerShell Modules from GitHub
Apache License 2.0
87 stars 31 forks source link

Expand-Archive error #19

Open Kirikou974 opened 4 years ago

Kirikou974 commented 4 years ago

Hello,

I was trying to use your script to install some random powershell module on github. I stumbled upon an error that happens during the Expand-Archive phase. It looks like using a file hash generates as a folder name that is too long for windows (well I guess). I did have to do some debugging because the Expand-Archive cmdlet does not show the correct error message when the path is too loong => https://github.com/PowerShell/Microsoft.PowerShell.Archive/issues/69 To fix it temporarily I replaced line 53 of InstallModuleFromGitHub.psm1 $tmpDir = "$tmpDir/$fileHash" with $tmpDir = "$tmpDir/$targetModuleName" directly in C:\Program Files\WindowsPowerShell\Modules\InstallModuleFromGitHub\1.4.0.