InstallModuleFromGitHub icon indicating copy to clipboard operation
InstallModuleFromGitHub copied to clipboard

Doesn't appear to work any more?

Open Borgquite opened this issue 3 years ago • 4 comments

On PowerShell 5.1, latest Windows 10.

Looks like the GitHub URLs are no longer valid?

Install-Module InstallModuleFromGitHub

Find-Module nameit | Install-ModuleFromGitHub

Invoke-RestMethod : {"message":"Not Found","documentation_url":"https://docs.github.com/rest"}
At C:\Program Files\WindowsPowerShell\Modules\InstallModuleFromGitHub\1.5.0\InstallModuleFromGitHub.psm1:48 char:17
+ ...             Invoke-RestMethod $url -OutFile $OutFile -Headers $header ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Borgquite avatar Apr 04 '22 10:04 Borgquite

Without having a windows machine in front of me at the moment, the first thing that catches my eye is that you’re running PS 5.1.

I remember that the PSModulePath on windows changed from PS 5.1 to 7.x. Do you have to ability to test this with PS 7.1 or higher?

rennerom avatar Nov 22 '22 02:11 rennerom

Hi,

I'm afraid not:

PowerShell 7.2.1
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS C:\Users\user.name> Install-Module installmodulefromgithub
PS C:\Users\user.name> find-module nameit

Version              Name                                Repository           Description
-------              ----                                ----------           -----------
2.3.5                NameIT                              PSGallery            PowerShell module to randomly generate n…

PS C:\Users\user.name> find-module nameit | Install-ModuleFromGitHub
Invoke-RestMethod: {"message":"Not Found","documentation_url":"https://docs.github.com/rest"}

Unblock-File: Cannot find path 'C:\Users\user.name\AppData\Local\Temp\NameIT.zip' because it does not exist.

Get-FileHash: Cannot find path 'C:\Users\user.name\AppData\Local\Temp\NameIT.zip' because it does not exist.

Expand-Archive: The path 'C:\Users\user.name\AppData\Local\Temp\NameIT.zip' either does not exist or is not a valid file system path.

Join-Path: Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'ChildPath'. Specified method is not
supported.

Copy-Item: Cannot find path 'C:\Users\user.name\AppData\Local\Temp\C:\Users\user.name\AppData\Local\Temp\_MEI144522

Borgquite avatar Nov 23 '22 11:11 Borgquite

Aha, this is an issue with the copy-path cmdlet. PR #25 was opened to address this.

rennerom avatar Nov 23 '22 22:11 rennerom

Sure - although does that explain the first 'Invoke-RestMethod: {"message":"Not Found","documentation_url":"https://docs.github.com/rest"}' error at the top?

Borgquite avatar Nov 24 '22 11:11 Borgquite