We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9d8c09 commit fce6e4eCopy full SHA for fce6e4e
src/Util/Executable.php
@@ -93,8 +93,12 @@ protected function runCommand($command)
93
94
$proc->setOptions($this->workDir)->execute();
95
96
- $data = $proc->getOutput() . \PHP_EOL . $proc->getErrorOutput();
97
- (new Path)->writeFile($this->logFile, $data, \FILE_APPEND);
+ if ($this->logFile && \is_writable(\dirname($this->logFile))) {
+ $data = $proc->getOutput() . \PHP_EOL . $proc->getErrorOutput();
98
+
99
+ (new Path)->writeFile($this->logFile, $data, \FILE_APPEND);
100
+ }
101
102
$this->isSuccessful = 0 === $proc->getExitCode();
103
104
return $proc->getOutput();
0 commit comments