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 6ae7e29 commit fcd09c6f622076729dd989029db4969ab9c27e9e @ArturDorochowicz ArturDorochowicz committed with 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 fcd09c6

Please sign in to comment.