You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mike Richmond (@mirichmo) This seems to break PowershellGet for me. If I run install-module zlocation, this results in the ZLocation module being installed to ~\Documents\WindowsPowerShell\Modules. However, this is no longer in PSModulePath. As a result using ipmo zlocation or trying to use any commands from the module fails.
Either this location should be kept in PSModulePath, or PowershellGet should install modules to the updated ~\Documents\Powershell\Modules location.
Asad Saeeduddin (@masaeedu) - I would preference for PowerShellGet to understand which edition it is that its being run on and install to \Documents\WindowsPowershell\Modules if Desktop or \Documents\PowerShell\Modules if on Core
Ryan Yates (@kilasuit) I don't have any particular preferences for where Powershell installs modules, as long as the out of box experience works without fiddling with my environment variables. Currently the out of box experience does not work. If you do require me to fiddle with my environment variables before install-module foo will work, the exact changes should be documented in the getting started markdown.
I would preference for PowerShellGet to understand which edition it is that its being run on and install to \Documents\WindowsPowershell\Modules if Desktop or \Documents\PowerShell\Modules if on Core
This is not what currently happens. I'm running Powershell Core and the version of PowershellGet loaded is the one bundled with the v6 alpha. Installed modules still end up in ~\Documents\WindowsPowershell.
PS C:\Program Files\PowerShell\6.0.0.9> ls C:\Users\masae\Documents\PowerShell\Modules
PS C:\Program Files\PowerShell\6.0.0.9> ls C:\Users\masae\Documents\WindowsPowerShell\Modules\
PS C:\Program Files\PowerShell\6.0.0.9> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-alpha
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
BuildVersion 3.0.0.0
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSEdition Core
CLRVersion
GitCommitId v6.0.0-alpha.9-107-gfb3d929e15c51028cf8d6ff6afd0dd19f288e9fd
WSManStackVersion 3.0
PS C:\Program Files\PowerShell\6.0.0.9> (get-command Install-Module).Module.Path
C:\program files\powershell\6.0.0.9\Modules\PowerShellGet\PSModule.psm1
PS C:\Program Files\PowerShell\6.0.0.9> Install-Module zlocation -Scope CurrentUser
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
PS C:\Program Files\PowerShell\6.0.0.9> ls C:\Users\masae\Documents\PowerShell\Modules
PS C:\Program Files\PowerShell\6.0.0.9> ls C:\Users\masae\Documents\WindowsPowerShell\Modules\
Directory: C:\Users\masae\Documents\WindowsPowerShell\Modules
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2016-08-21 4:27 PM ZLocation
PS C:\Program Files\PowerShell\6.0.0.9>
I personally never install modules to user location but that is because
I own my machine
Therefore I have admin rights
Also
This is not what currently happens.
Yeah but logically that is how it should work with the change to the User path in PSModulePath
Plus PowerShellGet requires some work before it really is a useful module and IMO should not have been bundled with PSCore until the issues were worked out especially with the move to SemanticVersioning which has broken a number of things.
That's great, but non-admin installs should still work as they did before. I should mention that admin installs with Powershell Core doesn't really fix the issue, so this is not relevant. C:\Program Files\WindowsPowerShell is not in the PSModulePath either, but that's where an AllUsers scoped install of a module ends up.
Yeah but logically that is how it should work with the change to the User path in PSModulePath
I'm not sure what this means. Are you saying this change is already checked in somewhere or that you agree it should behave as I mentioned earlier (i.e. either keep ~/Documents/WindowsPowershell in PSModulePath or make PowershellGet install to ~/Documents/Powershell on Powershell Core)?
especially with the move to SemanticVersioning which has broken a number of things.
The SemanticVersioning issues have been resolved in the nightlies.
I am aware you can manually import powershell modules from wherever they may exist on disk, but I don't see how this is relevant to fixing the install-module foo; ipmo foo; workflow we had in Powershell 5.
Activity
andyleejordan commentedon Jun 24, 2016
Linux values are set according to XDG BDS for user modules (per #935), and use the app base for system modules (i.e. next to SMA).
joeyaiello commentedon Jul 21, 2016
Mike Richmond (@mirichmo) Is this blocked by #1187?
mirichmo commentedon Jul 21, 2016
Yes
1 remaining item
daxian-dbw commentedon Aug 12, 2016
resolved by #1721
[-]Update PowerShell Module Path for Open PowerShell[/-][+]Update PowerShell Module Path for PowerShell[/+][-]Update PowerShell Module Path for PowerShell[/-][+]Update PowerShell Module Path [/+]Fixing implementation of GetModulePath to conform to the requirements…
masaeedu commentedon Aug 21, 2016
Mike Richmond (@mirichmo) This seems to break PowershellGet for me. If I run
install-module zlocation, this results in the ZLocation module being installed to ~\Documents\WindowsPowerShell\Modules. However, this is no longer inPSModulePath. As a result usingipmo zlocationor trying to use any commands from the module fails.Either this location should be kept in PSModulePath, or PowershellGet should install modules to the updated ~\Documents\Powershell\Modules location.
kilasuit commentedon Aug 21, 2016
Asad Saeeduddin (@masaeedu) - I would preference for PowerShellGet to understand which edition it is that its being run on and install to \Documents\WindowsPowershell\Modules if Desktop or \Documents\PowerShell\Modules if on Core
However there is nothing stopping you explictly adding a location to PSModulePath in your session or as part of your profile for PSCore like i've shown in this blog post https://blog.kilasuit.org/2016/08/21/1-small-thing-about-running-powershell-core-and-windows-powershell-side-by-side-on-windows/
masaeedu commentedon Aug 21, 2016
Ryan Yates (@kilasuit) I don't have any particular preferences for where Powershell installs modules, as long as the out of box experience works without fiddling with my environment variables. Currently the out of box experience does not work. If you do require me to fiddle with my environment variables before
install-module foowill work, the exact changes should be documented in the getting started markdown.masaeedu commentedon Aug 21, 2016
Ryan Yates (@kilasuit) Also, re:
This is not what currently happens. I'm running Powershell Core and the version of PowershellGet loaded is the one bundled with the v6 alpha. Installed modules still end up in ~\Documents\WindowsPowershell.
kilasuit commentedon Aug 21, 2016
I personally never install modules to user location but that is because
Also
Yeah but logically that is how it should work with the change to the User path in PSModulePath
Plus PowerShellGet requires some work before it really is a useful module and IMO should not have been bundled with PSCore until the issues were worked out especially with the move to SemanticVersioning which has broken a number of things.
kilasuit commentedon Aug 21, 2016
You can always import modules using the full path to the psd1/psm1/dll file (which I actually do really more frequently than just via the module name)
So like so it would be
Import-Module C:\Users\Ryan\OneDrive\GitHub\PowerShellModules\PesterHelpers\PesterHelpers.psd1masaeedu commentedon Aug 21, 2016
That's great, but non-admin installs should still work as they did before. I should mention that admin installs with Powershell Core doesn't really fix the issue, so this is not relevant.
C:\Program Files\WindowsPowerShellis not in the PSModulePath either, but that's where anAllUsersscoped install of a module ends up.I'm not sure what this means. Are you saying this change is already checked in somewhere or that you agree it should behave as I mentioned earlier (i.e. either keep ~/Documents/WindowsPowershell in PSModulePath or make PowershellGet install to ~/Documents/Powershell on Powershell Core)?
The SemanticVersioning issues have been resolved in the nightlies.
I am aware you can manually import powershell modules from wherever they may exist on disk, but I don't see how this is relevant to fixing the
install-module foo; ipmo foo;workflow we had in Powershell 5.mirichmo commentedon Aug 22, 2016
Manikyam Bavandla (@bmanikm) Can you please take a look at this. It seems like Asad Saeeduddin (@masaeedu) is reporting a bug in PowerShellGet and I'd like you to confirm it. If so, please file a new issue to cover it.
bmanikm commentedon Aug 22, 2016
Mike Richmond (@mirichmo) Asad Saeeduddin (@masaeedu) I have created #2021 to correct the installation locations in PowerShell Core on Windows.
Fixing implementation of GetModulePath to conform to the requirements…