diff --git a/provision/windows/ps.ps1 b/provision/windows/ps.ps1 index a01a527..50afa1b 100644 --- a/provision/windows/ps.ps1 +++ b/provision/windows/ps.ps1 @@ -40,8 +40,8 @@ function choco { Start-Choco $Args } -cd c:/vagrant/provision/windows +Set-Location c:/vagrant/provision/windows $script = Resolve-Path $script -cd (Split-Path $script -Parent) +Set-Location (Split-Path $script -Parent) Write-Host "Running $script..." . $script @scriptArguments diff --git a/provision/windows/use-chocolatey-repository.ps1 b/provision/windows/use-chocolatey-repository.ps1 index a2dcf06..d935a32 100644 --- a/provision/windows/use-chocolatey-repository.ps1 +++ b/provision/windows/use-chocolatey-repository.ps1 @@ -36,7 +36,7 @@ SetDefaultBrowser HKLM "Google Chrome" Write-Host 'Creating the graceful-terminating-console-application-windows chocolatey package...' Push-Location $env:TEMP mkdir graceful-terminating-console-application-windows | Out-Null -cd graceful-terminating-console-application-windows +Set-Location graceful-terminating-console-application-windows Set-Content -Encoding Ascii graceful-terminating-console-application-windows.nuspec @' @@ -69,4 +69,4 @@ Pop-Location Write-Host 'Installing the graceful-terminating-console-application-windows chocolatey package...' choco install -y graceful-terminating-console-application-windows Write-Host 'graceful-terminating-console-application-windows installed at:' -dir C:\ProgramData\chocolatey\bin\graceful-terminating-console-application-windows.exe +Get-ChildItem C:\ProgramData\chocolatey\bin\graceful-terminating-console-application-windows.exe diff --git a/provision/windows/use-npm-repository.ps1 b/provision/windows/use-npm-repository.ps1 index 3d2f845..cb47401 100644 --- a/provision/windows/use-npm-repository.ps1 +++ b/provision/windows/use-npm-repository.ps1 @@ -17,10 +17,10 @@ function external([string]$cmd, [string[]]$arguments) { function node { external node.exe $Args } function npm { external npm.cmd $Args } -cd $env:USERPROFILE +Set-Location $env:USERPROFILE mkdir tmp | Out-Null mkdir tmp/use-npm-repository | Out-Null -cd tmp/use-npm-repository +Set-Location tmp/use-npm-repository # # test the npm repositories. @@ -47,7 +47,7 @@ npm config set registry https://$nexusDomain/repository/npm-group/ # install a package that indirectly uses the npmjs.org-proxy repository. mkdir hello-world-win-npm | Out-Null -pushd hello-world-win-npm +Push-Location hello-world-win-npm Set-Content ` -Encoding Ascii ` package.json ` @@ -93,11 +93,11 @@ npm set "//$nexusDomain/repository/npm-hosted/:_authToken" $npmAuthToken # NB instead of using the token from the npm configuration you can # set the NPM_TOKEN environment variable. npm publish --registry=$env:NPM_REGISTRY -popd +Pop-Location # use the published package. mkdir use-hello-world-win-npm | Out-Null -pushd use-hello-world-win-npm +Push-Location use-hello-world-win-npm Set-Content ` -Encoding Ascii ` hello-world-win.js ` @@ -116,4 +116,4 @@ Set-Content ` '@ npm install hello-world-win node node_modules/hello-world-win/hello-world-win.js -popd +Pop-Location diff --git a/provision/windows/use-powershell-repository.ps1 b/provision/windows/use-powershell-repository.ps1 index deebc80..30fc3ce 100644 --- a/provision/windows/use-powershell-repository.ps1 +++ b/provision/windows/use-powershell-repository.ps1 @@ -34,7 +34,7 @@ New-Item ` | Out-Null Write-Host 'Publishing the ExampleGreeter module into the nexus server...' -cd $env:TEMP +Set-Location $env:TEMP mkdir ExampleGreeter | Out-Null Push-Location ExampleGreeter Set-Content `