Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update install to create $PROFILE before checking if git command exis…

…ts, to make adding an alias easier
  • Loading branch information...
commit c12b7cc46ecdafcba9fcc28302fa76054519a7d0 1 parent f677870
@dahlbyk authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 install.ps1
View
10 install.ps1
@@ -5,6 +5,11 @@ if($PSVersionTable.PSVersion.Major -lt 2) {
return
}
+if(!(Test-Path $PROFILE)) {
+ Write-Host "Creating PowerShell profile...`n$PROFILE"
+ New-Item $PROFILE -Force -Type File -ErrorAction Stop -WhatIf:$WhatIf > $null
+}
+
if(!(Get-Command git -ErrorAction SilentlyContinue)) {
Write-Warning 'Could not find git command. Please create a git alias or add %ProgramFiles%\Git\cmd to PATH.'
return
@@ -15,11 +20,6 @@ if(!(. (Join-Path $installDir "CheckVersion.ps1"))) {
return
}
-if(!(Test-Path $PROFILE)) {
- Write-Host "Creating PowerShell profile...`n$PROFILE"
- New-Item $PROFILE -Force -Type File -ErrorAction Stop -WhatIf:$WhatIf > $null
-}
-
# Adapted from http://www.west-wind.com/Weblog/posts/197245.aspx
function Get-FileEncoding($Path) {
$bytes = [byte[]](Get-Content $Path -Encoding byte -ReadCount 4 -TotalCount 4)
Please sign in to comment.
Something went wrong with that request. Please try again.