Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changes to support running in strict mode.

  • Loading branch information...
commit a66ca6a226040f53f8559d50d2947778b8d51302 1 parent b35085d
@lukebakken lukebakken authored committed
Showing with 11 additions and 7 deletions.
  1. +2 −0  CheckVersion.ps1
  2. +4 −2 GitPrompt.ps1
  3. +5 −5 posh-git.psm1
View
2  CheckVersion.ps1
@@ -1,3 +1,5 @@
+$Global:GitMissing = $false
+
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
View
6 GitPrompt.ps1
@@ -42,7 +42,7 @@ $global:GitPromptSettings = New-Object PSObject -Property @{
AutoRefreshIndex = $true
- EnablePromptStatus = !$GitMissing
+ EnablePromptStatus = !$Global:GitMissing
EnableFileStatus = $true
RepositoriesInWhichToDisableFileStatus = @( ) # Array of repository paths
@@ -123,7 +123,9 @@ function Write-GitStatus($status) {
}
}
-if (!$Global:VcsPromptStatuses) { $Global:VcsPromptStatuses = @() }
+if((Get-Variable -Scope Global -Name VcsPromptStatuses -ErrorAction SilentlyContinue) -eq $null) {
+ $Global:VcsPromptStatuses = @()
+}
function Global:Write-VcsStatus { $Global:VcsPromptStatuses | foreach { & $_ } }
# Add scriptblock that will execute for Write-VcsStatus
View
10 posh-git.psm1
@@ -3,11 +3,11 @@ if (Get-Module posh-git) { return }
Push-Location $psScriptRoot
.\CheckVersion.ps1 > $null
-. ./Utils.ps1
-. ./GitUtils.ps1
-. ./GitPrompt.ps1
-. ./GitTabExpansion.ps1
-. ./TortoiseGit.ps1
+. .\Utils.ps1
+. .\GitUtils.ps1
+. .\GitPrompt.ps1
+. .\GitTabExpansion.ps1
+. .\TortoiseGit.ps1
Pop-Location
if (!$Env:HOME) { $Env:HOME = "$Env:HOMEDRIVE$Env:HOMEPATH" }
Please sign in to comment.
Something went wrong with that request. Please try again.