Skip to content

Commit f895b71

Browse files
committed
MQE-1510
1 parent 6ed2be4 commit f895b71

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

etc/config/command.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
$output = "CLI command timed out, no output available.";
4242
$idleTimeout = true;
4343
}
44+
45+
if (checkForFilePath($output)) {
46+
$output = "CLI output suppressed, filepath detected in output.";
47+
}
48+
4449
$exitCode = $process->getExitCode();
4550

4651
if ($exitCode == 0 || $idleTimeout) {
@@ -104,3 +109,13 @@ function trimAfterWhitespace($string)
104109
{
105110
return strtok($string, ' ');
106111
}
112+
113+
/**
114+
* Detects file path in string.
115+
* @param string $string
116+
* @return boolean
117+
*/
118+
function checkForFilePath($string)
119+
{
120+
return preg_match('/\/[\S]+\//', $string);
121+
}

0 commit comments

Comments
 (0)