aboutsummaryrefslogtreecommitdiff
path: root/.appveyor.yml
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-09-30 15:14:21 +1000
committerteor <teor@torproject.org>2019-09-30 15:14:21 +1000
commitb186418792fe1283855acf2f143661b7c6d7254e (patch)
tree88fcf5abfe98b62b0375185862abf66d068e8ee7 /.appveyor.yml
parent02840169d860384257042bdf6d7601c2bf48b47b (diff)
downloadtor-b186418792fe1283855acf2f143661b7c6d7254e.tar.gz
tor-b186418792fe1283855acf2f143661b7c6d7254e.zip
Appveyor: Avoid spurious errors in Appveyor CI builds
When Appveyor fails before the install step, some of the finish step's functions were not defined. Fixes bug 31884; bugfix on 0.3.4.2-alpha.
Diffstat (limited to '.appveyor.yml')
-rw-r--r--.appveyor.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 9913bf3bd9..54456aa25d 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -100,6 +100,18 @@ test_script:
on_finish:
- ps: >-
+ <# if we failed before install:, these functions won't be defined #>
+ Function Execute-Command ($commandPath)
+ {
+ & $commandPath $args 2>&1
+ if ( $LastExitCode -ne 0 ) {
+ $host.SetShouldExit( $LastExitCode )
+ }
+ }
+ Function Execute-Bash ()
+ {
+ Execute-Command 'c:\msys64\usr\bin\bash' '-e' '-c' $args
+ }
if ($env:compiler -eq "mingw") {
<# use the MSYS2 user binaries to archive failures #>
$oldpath = ${env:Path} -split ';'