Install-PSResource did not install module and is silent about it

See original GitHub issue

I tried to install PSReadLine 2.1.0-beta2 like so:

06-06 13:42:09 6> Install-PSResource PSReadLine -Prerelease -TrustRepository

And got no output so I assumed it installed. But no, it apparently didn’t. When I run this with -Verbose I see this:

06-06 13:42:40 7> Install-PSResource PSReadLine -Prerelease -TrustRepository -Verbose
VERBOSE: Current user scope installation path: C:\Users\Keith\Documents\PowerShell
VERBOSE: All users scope installation path: C:\Program Files\PowerShell
VERBOSE: Scope is: CurrentUser

If Install-PSResource didn’t actually install the module I’d like to at least see a message (or warning) along those lines.

This is on PSGet 3.0.0-beta4 running on PS 7.0.1 on Windows 10 2004. Also, I had PSRL 2.1.0-beta1 installed with PSGet 2.2.x in ~\Documents\PowerShell\Modules\PSReadLine\2.1.0. It appears something also installed PSRL directly in ~\Documents\PowerShell\Modules\PSReadLine. Anyway, I removed the PSRL folder and tried again:

06-06 14:13:32 1> Install-PSResource PSReadLine -Prerelease -TrustRepository -Verbose
VERBOSE: Current user scope installation path: C:\Users\Keith\Documents\PowerShell
VERBOSE: All users scope installation path: C:\Program Files\PowerShell
VERBOSE: Scope is: CurrentUser
VERBOSE: Verbose statement

This time it installed into ~\Documents\PowerShell\Modules\PSReadLine\2.1.0-betat2. Yay. So I’m not sure exactly what this command did earlier when PSRL 2.1.0-beta1 was installed but it did not install anything i.e. PS still loaded 2.1.0-beta1.

Argh! Now neither PS 7.0.1 nor PS 7.1.0-preview3 will load from that 2.1.0-beta2 directory. Off to rename it to remove the -beta2. Dang! I liked that naming convention because it allows installing new prerelease versions without running into “file in use” conflicts.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SydneyhSmithcommented, Sep 8, 2020

Thanks, we have added a message for when it installs and most situations where it wouldn’t but will add an additional check at the end to verify installation

1reaction
alericksoncommented, Aug 15, 2020

@MartinHBA it’ll be resolved for our GA release… it’s a slightly confusing tag

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install-PSResource did not install module and is silent ...
This time it installed into ~\Documents\PowerShell\Modules\PSReadLine\2.1.0-betat2 . Yay. So I'm not sure exactly what this command did earlier ...
Read more >
Install-PSResource - PowerShell
This cmdlet installs resources from a registered repository to an installation path on a machine. By default, the cmdlet doesn't return any object....
Read more >
Update-PSResource - PowerShell
Update-PSResource downloads and installs the newest version of a package already installed on the local machine. This cmdlet replaces the Update-Module and ...
Read more >
What is PowerShellGet and How to Install PowerShellGet 3.0
The Install-PSResource cmdlet supports similar parameters to Install-Module but have slightly different names and meanings. For example, - ...
Read more >
Run Az PowerShell modules in C# .NET ...
My understanding is: I need PowerShellGet to download and install modules. PowerShellGet version 3 has a command called Install-PSResource that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found