We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
waitUntil
Process
1 parent 57a35ec commit a5f6fccCopy full SHA for a5f6fcc
src/Illuminate/Process/InvokedProcess.php
@@ -130,4 +130,23 @@ public function wait(?callable $output = null)
130
throw new ProcessTimedOutException($e, new ProcessResult($this->process));
131
}
132
133
+
134
+ /**
135
+ * Wait until the given callback returns true.
136
+ *
137
+ * @param callable|null $output
138
+ * @return \Illuminate\Process\ProcessResult
139
140
+ * @throws \Illuminate\Process\Exceptions\ProcessTimedOutException
141
+ */
142
+ public function waitUntil(?callable $output = null)
143
+ {
144
+ try {
145
+ $this->process->waitUntil($output);
146
147
+ return new ProcessResult($this->process);
148
+ } catch (SymfonyTimeoutException $e) {
149
+ throw new ProcessTimedOutException($e, new ProcessResult($this->process));
150
+ }
151
152
0 commit comments