Skip to content

Commit

Permalink
Improved watch script error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Sep 21, 2020
1 parent 3b4d5e4 commit 04f89d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 0install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 | %{ "$_" }
}
2 changes: 2 additions & 0 deletions watch.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
$ErrorActionPreference = "Stop"
pushd $PSScriptRoot

if (-not (Test-Path "..\incoming" -PathType Container)) {
Expand All @@ -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"}
}
}

Expand Down
1 change: 1 addition & 0 deletions watch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e
cd `dirname $0`

if [ ! -d "../incoming" ]; then
Expand Down

0 comments on commit 04f89d8

Please sign in to comment.