]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Appveyor: Avoid spurious errors in Appveyor CI builds
authorteor <teor@torproject.org>
Mon, 30 Sep 2019 05:14:21 +0000 (15:14 +1000)
committerteor <teor@torproject.org>
Mon, 30 Sep 2019 05:14:21 +0000 (15:14 +1000)
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.

.appveyor.yml
changes/bug31884 [new file with mode: 0644]

index 9913bf3bd9fd3579a2313344d7f239fe2df6e23f..54456aa25d5e5f372198f7a018b2b9f3aa963d1e 100644 (file)
@@ -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 ';'
diff --git a/changes/bug31884 b/changes/bug31884
new file mode 100644 (file)
index 0000000..ddb6c50
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (Appveyor CI):
+    - Avoid spurious errors when Appveyor CI fails before the install step.
+      Fixes bug 31884; bugfix on 0.3.4.2-alpha.