lib/vagrant-windows/scripts/command_alias.ps1 in vagrant-windows-0.1.2 vs lib/vagrant-windows/scripts/command_alias.ps1 in vagrant-windows-1.0.0

- old
+ new

@@ -1,12 +1,21 @@ function which { - $command = [Array](Get-Command $args[0] -errorAction continue) - write-host $command[0].Definition + $command = [Array](Get-Command $args[0] -errorAction SilentlyContinue) + if($null -eq $command) + { + exit 1 + } + write-host $command[0].Definition + exit 0 } function test ([Switch] $d, [String] $path) { - Resolve-Path $path| Out-Null; + if(Test-Path $path) + { + exit 0 + } + exit 1 } function chown { exit 0 } @@ -15,9 +24,9 @@ { if(Test-Path $path) { exit 0 } else { - New-Item $p -Type Directory -Force | Out-Null + New-Item $path -Type Directory -Force | Out-Null } }