diff --git a/0install.ps1 b/0install.ps1 index a03a32602..3c3b9d77a 100644 --- a/0install.ps1 +++ b/0install.ps1 @@ -11,7 +11,7 @@ function download { } if (Get-Command 0install -ErrorAction SilentlyContinue) { - 0install @args + 0install @args | %{ "$_" } } else { - . "$(download)\0install.exe" @args + . "$(download)\0install.exe" @args | %{ "$_" } } diff --git a/watch.ps1 b/watch.ps1 index a10a5bbb2..63e26e9e2 100644 --- a/watch.ps1 +++ b/watch.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = "Stop" pushd $PSScriptRoot if (-not (Test-Path "..\incoming" -PathType Container)) { @@ -11,6 +12,7 @@ foreach ($file in (ls -Recurse -Filter *.watch.py).FullName) { echo $file #.\0install.ps1 run --batch https://apps.0install.net/0install/0watch.xml --output ..\incoming $file .\0install.ps1 run --batch 0watch-windows.xml.selections --output ..\incoming $file + if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"} } } diff --git a/watch.sh b/watch.sh index 873372414..191cfca23 100755 --- a/watch.sh +++ b/watch.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e cd `dirname $0` if [ ! -d "../incoming" ]; then