function taskman_shell_ensure($cmd) { taskman_shell($cmd, $ret); if ($ret != 0) { throw new TaskmanException("Script execution error(return code {$ret})"); } }
function shell($cmd, &$ret = null, &$out = null) { return \taskman_shell($cmd, $ret, $out); }
function taskman_shell_ensure($cmd, &$out = null) { taskman_shell($cmd, $ret, $out); if ($ret != 0) { throw new TaskmanException("Shell execution error(exit code {$ret})" . (is_array($out) ? ":\n" . implode("\n", $out) : '')); } }