Files
vscode/build/tfs/win32/lib.ps1
T
2017-05-12 11:03:02 +02:00

25 lines
692 B
PowerShell

# stop when there's an error
$ErrorActionPreference = 'Stop'
# set agent specific npm cache
if (Test-Path env:AGENT_WORKFOLDER) {
$env:npm_config_cache = "${env:AGENT_WORKFOLDER}\npm-cache"
}
# throw when a process exits with something other than 0
function exec([scriptblock]$cmd, [string]$errorMessage = "Error executing command: " + $cmd) {
& $cmd
if ($LastExitCode -ne 0) {
throw $errorMessage
}
}
# log build step
function STEP() {
Write-Host ""
Write-Host "********************************************************************************"
Write-Host "*** $args"
Write-Host "********************************************************************************"
Write-Host ""
}