Skip to content

Commit

Permalink
Allow use of pipefail
Browse files Browse the repository at this point in the history
  • Loading branch information
fredden committed Jun 9, 2022
1 parent e0da09c commit b554eae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion src/N98/Util/Exec.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function run($command, &$output = null, &$returnCode = null)
throw new RuntimeException($message);
}

if (OperatingSystem::isBashCompatibleShell() && self::isPipefailOptionAvailable()) {
if (self::isPipefailOptionAvailable()) {
$command = self::SET_O_PIPEFAIL . $command;
}

Expand Down
11 changes: 0 additions & 11 deletions src/N98/Util/OperatingSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,4 @@ public static function getCurrentPhpBinary()

return self::getPhpBinary();
}

/**
* @return bool
*/
public static function isBashCompatibleShell()
{
return in_array(
basename(getenv('SHELL')),
['bash', 'zsh']
);
}
}

0 comments on commit b554eae

Please sign in to comment.