Skip to content

Commit

Permalink
Remove extra call to Split-Path $MyInvocation ...
Browse files Browse the repository at this point in the history
  • Loading branch information
rkeithhill committed Jan 8, 2017
1 parent bbabf70 commit 8eac200
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
param([switch]$WhatIf = $false)

# Dot source for Get-FileEncoding
$scriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
. $scriptRoot\Utils.ps1
$installDir = Split-Path $MyInvocation.MyCommand.Path -Parent
. $installDir\Utils.ps1

if($PSVersionTable.PSVersion.Major -lt 2) {
Write-Warning "posh-git requires PowerShell 2.0 or better; you have version $($Host.Version)."
Expand All @@ -19,7 +19,6 @@ if(!(Get-Command git -ErrorAction SilentlyContinue)) {
return
}

$installDir = Split-Path $MyInvocation.MyCommand.Path -Parent
if(!(. (Join-Path $installDir "CheckVersion.ps1"))) {
return
}
Expand Down

0 comments on commit 8eac200

Please sign in to comment.