Skip to content

Commit

Permalink
CLI-1268: Suppress posix warnings (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell authored Mar 27, 2024
1 parent fcec6eb commit f756e57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Helpers/LocalMachineHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function executeFromCmd(string $cmd, callable $callback = NULL, string $c
* @param array|null $env
*/
private function configureProcess(Process $process, string $cwd = NULL, ?bool $printOutput = TRUE, float $timeout = NULL, array $env = NULL, bool $stdin = TRUE): Process {
if (function_exists('posix_isatty') && !posix_isatty(STDIN) && $stdin) {
if (function_exists('posix_isatty') && !@posix_isatty(STDIN) && $stdin) {
$process->setInput(STDIN);
}
if ($cwd) {
Expand Down Expand Up @@ -183,7 +183,7 @@ public function useTty(): bool {
// of a tty if stdout is redirected.
// Otherwise, let the local machine helper decide whether to use a tty.
if (function_exists('posix_isatty')) {
return (posix_isatty(STDOUT) && posix_isatty(STDIN));
return (posix_isatty(STDOUT) && @posix_isatty(STDIN));
}

return FALSE;
Expand Down

0 comments on commit f756e57

Please sign in to comment.