Permalink
Browse files

Ensure TabExpansion function exists before rename.

Prevents an error in environment where there is no initial TabExpansion function defined.
  • Loading branch information...
1 parent a20bd7f commit a9ecf2468203811754dd467e1e636948e213f9be @ArturDorochowicz ArturDorochowicz committed Jan 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 tabexpansion/Readme.PsakeTab.txt
@@ -12,7 +12,7 @@ Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
. ./PsakeTabExpansion.ps1
Pop-Location
-if(-not (Test-Path Function:\DefaultTabExpansion)) {
+if((Test-Path Function:\TabExpansion) -and (-not (Test-Path Function:\DefaultTabExpansion))) {
Rename-Item Function:\TabExpansion DefaultTabExpansion
}

0 comments on commit a9ecf24

Please sign in to comment.