Skip to content

Doesn't appear to work any more? #27

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

Open
Borgquite opened this issue Apr 4, 2022 · 4 comments
Open

Doesn't appear to work any more? #27

Borgquite opened this issue Apr 4, 2022 · 4 comments

Comments

@Borgquite
Copy link

Borgquite commented Apr 4, 2022

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
@rennerom
Copy link
Contributor

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?

@Borgquite
Copy link
Author

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

@rennerom
Copy link
Contributor

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

@Borgquite
Copy link
Author

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

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

2 participants