forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fix-job-success-test.patch
30 lines (26 loc) · 1.09 KB
/
fix-job-success-test.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 01b72d867cc2bdbaff1765499a6395f7bc94e2be Mon Sep 17 00:00:00 2001
From: Sanket Mehta <[email protected]>
Date: Tue, 1 Dec 2015 11:34:32 +0530
Subject: [PATCH] Set 'succeeded' flag to true/false by checking for the step
failure everytime (it gets executed).
These was an issue with the current implementation.
Once the 'succeeded' flag is set to true, the following batch step
execution does not stop executiong of following steps on failure, even
we have set 'onerror' to 'f' for that step.
---
job.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/job.cpp b/job.cpp
index f3eaa03..9864f57 100644
--- a/job.cpp
+++ b/job.cpp
@@ -307,9 +307,7 @@ int Job::Execute()
// set success status for batch runs, be pessimistic by default
LogMessage(wxString::Format(_("Script return code: %d"), rc), LOG_DEBUG);
- if (rc == 0)
- succeeded = true;
-
+ succeeded = ((rc == 0) ? true : false);
// If output is empty then either script did not return any output
// or script threw some error into stderr.
// Check script threw some error into stderr