pecigonzalo / Oh-My-Posh

Powershell amazingness inspired on Oh-My-Zsh, pshazz, fish. This provides a repository for PowerShell Customizations
http://pecigonzalo.github.io/Oh-My-Posh
GNU Affero General Public License v3.0
343 stars 34 forks source link

Oh-My-Powershell module files are not placed under "Oh-My-Powershell" directory #8

Closed ralekna closed 8 years ago

ralekna commented 8 years ago

Hi,

I had an installation issue: once I runned install script specified in README.md (iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/pecigonzalo/Oh-My-Powershell/master/install.ps1'))) Oh-My-Powershell module files was placed in the root of Modules dir (instead of Modules/Oh-My-Powershell), so command in user profile Import-Module "Oh-My-Powershell" -DisableNameChecking -NoClobber was failing to load module. Placing under appropriate directory solved the issue.

ralekna commented 8 years ago

I think patch at this line (https://github.com/pecigonzalo/Oh-My-Powershell/blob/master/install.ps1#L23) would help Copy-Item -Recurse -Force $Env:USERPROFILE\.oh-my-powershell\modules\oh-my-powershell "$([Environment]::GetFolderPath("mydocuments"))\WindowsPowerShell\Modules\oh-my-powershell"

pecigonzalo commented 8 years ago

Ralekna, thats odd as i never had that issue but ill happily investigate, thanks for the report!

pecigonzalo commented 8 years ago

This also shows that im not checking for the module being installed after the installation, ill fix that as part of this fix.

pecigonzalo commented 8 years ago

@ralekna can you send me your $PSVersionTable ? thanks

ralekna commented 8 years ago

Yes :)

Name                           Value
----                           -----
PSVersion                      5.0.10586.0
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.0
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
pecigonzalo commented 8 years ago

Ok, i found the issue, you didnt had the modules folder already in place $([Environment]::GetFolderPath("mydocuments"))\WindowsPowerShell\Modules so for some reason it just copies the files instead of the folder if thats the case.

Ill fix it ASAP, thanks for the report.