-
Notifications
You must be signed in to change notification settings - Fork 139
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
Upgrade of the PSReadLine fails due that The version '2.0.0' of module 'PSReadLine' is currently in use.
#644
Comments
From the Upgrading section of
You need to close all powershell instances and then run |
@daxian-dbw , please read the issue once again carefully. PSReadLine is loaded (probably in background) by modules used to perform installation. Please reopen my issue. Thank you. |
In your repro, you are installing Make sure you follow the upgrading instructions to install newer versions of |
Thanks for clarifying your repro steps. Now this looks like an issue with the |
Don't you need to run pwsh with the |
@vexx32 When running
|
@it-praktyk @daxian-dbw that's not an issue I've seen before. As a work around, you can always use Save-Module and specify the module directory as the -path to install to. |
@alerickson This is on Linux. On Linux, Maybe this issue should be transferred to https://github.com/powershell/powershellget ? |
@daxian-dbw Yes, please transfer to PowerShellGet.
|
@SteveL-MSFT Can you please help transfer this issue to the https://github.com/powershell/powershellget repository? |
If it is Install-Module issue we need to find and document a workaround in PSRadline repo if possible. Otherwise we get a lot of new issues opened in the repo :-) |
@iSazonov I'm pretty confident |
I was able to save the PSReadLine module locally using the As a part of a documented workaround, I propose to add information about (one of them):
|
I've checked today - after upgrading to PSCore 7.0 - the issue still exists. BTW, can you relabel the issue? |
This issue is really about |
As for a workaround, we plan to publish version 2.0.1 with the same bits as in 2.0.0, so installing the latest module will be put in a |
@daxian-dbw - When moving from 1.2 to 2.0 - I changed the name of the DLL from I think the dll name could go back to the original name now since most systems have been using preview releases of 2.0. |
I temporarily moved the |
@aavdberg Another bizarre instance of the problem. And again, I cannot reproduce on my Windows machine ... (see the screenshot below) @aavdberg Can you please open an issue in https://github.com/powershell/powershellget? Please describe the context of your environment, such as what previous version of PSReadLine were installed, at what location. |
Thank you @daxian-dbw made the following issue. |
If I run this command from pwsh, I see that PSReadline is running in the below directory C:\program files\powershell\7\Modules\PSReadLine\PSReadLine.psm1 If I go to C:\program files\powershell\7\Modules and rename PSReadLine to PSReadLine.old And then restart pwsh And Run: PS C:\Windows\System32> get-module psreadline|select-object -Property path C:\Program Files\WindowsPowerShell\Modules\PSReadLine\2.0.1\PSReadLine.psm1 Maybe this is connected to the issue? |
I wanted to share what finally worked for me. I did not understand that there were multiple versions of PSReadline installed for a myriad of profiles, each finding different versions. Using each profile, run I was able to see the details for all the found versions of PSReadline and their installation folders. I simply deleted all that I could find for each profile, and once done, then finally as administrator in powershell
I can't remember if VS Code terminal still did not see the PSReadline and I also needed to reinstall there, but everything is finally working well, and I only have one version of PSReadline installed |
What worked for me was this answer from: https://superuser.com/questions/1733481/how-to-update-psreadline-properly-in-powershell-7-2-5/1734993#1734993
|
In case you have Powertoys installed make sure to close it as well. |
So how to properly upgrade PSRealine? Install module complains that
So how to not install it side-by-side? Is this not supported? I can't remove 2.0.0 via Uninstall-Module because it wasn't installed that way (I think it's the one shipped with win 1 by default). Is the only option to remove psreadline module is to go and manually delete the files and hope nothing breaks? |
Environment
Exception report
Nope
Steps to reproduce
I try to update the PSReadLine module by the following instruction from the README
The return is
When I try to do that from PowerShell console
Expected behavior
The module will be installed from the PowerShell Gallery.
Actual behavior
As described in the 'Steps to reproduce' section.
The text was updated successfully, but these errors were encountered: