Skip to content

Commit

Permalink
Merge pull request #351 from dahlbyk/import-fix
Browse files Browse the repository at this point in the history
Fix that module can be found by not imported?
  • Loading branch information
dahlbyk authored Jan 4, 2017
2 parents a314b05 + 0b71116 commit 1f459b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions profile.example.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Import the posh-git module, first via installed posh-git module.
# If the module isn't installed, then attempt to load it from the cloned posh-git Git repo.
if (Get-Module posh-git -ListAvailable) {
Import-Module posh-git
$poshGitModule = Get-Module posh-git -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1
if ($poshGitModule) {
$poshGitModule | Import-Module
}
elseif (Test-Path -LiteralPath $PSScriptRoot\posh-git.psd1) {
Import-Module $PSScriptRoot\posh-git.psd1
Expand Down

0 comments on commit 1f459b6

Please sign in to comment.