Skip to content

Commit

Permalink
Update prompt to not fail if git command is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Aug 19, 2011
1 parent 78e4f2c commit da37edf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CheckVersion.ps1
@@ -1,3 +1,8 @@
if (!(Get-Command git -TotalCount 1 -ErrorAction SilentlyContinue)) {
Write-Warning "git command could not be found. Please create an alias or add it to your PATH."
$Global:GitMissing = $true
return
}
$version = git --version 2> $null
if($version -notlike 'git version 1.7.*.msysgit.*') {
Write-Warning "posh-git requires msysgit version 1.7. You have $version."
Expand Down
2 changes: 1 addition & 1 deletion GitPrompt.ps1
Expand Up @@ -40,7 +40,7 @@ $global:GitPromptSettings = New-Object PSObject -Property @{

AutoRefreshIndex = $true

EnablePromptStatus = $true
EnablePromptStatus = !$GitMissing
EnableFileStatus = $true

Debug = $false
Expand Down

0 comments on commit da37edf

Please sign in to comment.