Skip to content

Commit

Permalink
refactor: check for availability of posh-git iso cmdlet
Browse files Browse the repository at this point in the history
resolves #325
  • Loading branch information
JanDeDobbeleer committed Jan 7, 2021
1 parent c57368c commit 598984b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/powershell/oh-my-posh/oh-my-posh.psm1
Expand Up @@ -27,7 +27,7 @@ if ($PSVersionTable.PSEdition -eq "Core" -and !$IsWindows) {
function Set-PoshContext {}

function Set-GitStatus {
if (Get-Command -Name "Get-GitStatus" -ErrorAction SilentlyContinue) {
if (Get-Module -Name "posh-git") {
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSProvideCommentHelp', '', Justification='Variable used later(not in this scope)')]
$Global:GitStatus = Get-GitStatus
}
Expand Down
2 changes: 1 addition & 1 deletion src/init/omp.ps1
Expand Up @@ -8,7 +8,7 @@ if (Test-Path "::CONFIG::") {
function Set-PoshContext {}

function Set-GitStatus {
if (Get-Command -Name "Get-GitStatus" -ErrorAction SilentlyContinue) {
if (Get-Module -Name "posh-git") {
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSProvideCommentHelp', '', Justification='Variable used later(not in this scope)')]
$Global:GitStatus = Get-GitStatus
}
Expand Down

0 comments on commit 598984b

Please sign in to comment.