File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ protected function doRequestInProcess($request)
235
235
$ process = new PhpProcess ($ this ->getScript ($ request ));
236
236
$ process ->run ();
237
237
238
- if ($ process ->getExitCode () > 0 ) {
238
+ if (! $ process ->isSuccessful () ) {
239
239
throw new \RuntimeException ($ process ->getErrorOutput ());
240
240
}
241
241
Original file line number Diff line number Diff line change @@ -194,6 +194,16 @@ public function getExitCode()
194
194
return $ this ->exitcode ;
195
195
}
196
196
197
+ /**
198
+ * Checks if the process ended successfully.
199
+ *
200
+ * @return Boolean true if the process ended successfully, false otherwise
201
+ */
202
+ public function isSuccessful ()
203
+ {
204
+ return 0 == $ this ->exitcode ;
205
+ }
206
+
197
207
/**
198
208
* Returns true if the child process has been terminated by an uncaught signal.
199
209
*
You can’t perform that action at this time.
0 commit comments