Skip to content

Commit

Permalink
Catch Exception and translate to false
Browse files Browse the repository at this point in the history
Closes #273
  • Loading branch information
theseer committed Nov 29, 2020
1 parent 51b8da5 commit 57c5bc1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/shared/environment/UnixoidEnvironment.php
Expand Up @@ -49,8 +49,12 @@ public function supportsColoredOutput(): bool {
return false;
}

$tput = $this->getPathToCommand('tput');
$commandResult = $this->executor->execute($tput, 'colors');
try {
$tput = $this->getPathToCommand('tput');
$commandResult = $this->executor->execute($tput, 'colors');
} catch(\Throwable $t) {
return false;
}

if (!$commandResult->isSuccess()) {
return false;
Expand Down

0 comments on commit 57c5bc1

Please sign in to comment.