function taskman_shell_ensure($cmd)
{
    taskman_shell($cmd, $ret);
    if ($ret != 0) {
        throw new TaskmanException("Script execution error(return code {$ret})");
    }
}
Example #2
0
function shell($cmd, &$ret = null, &$out = null)
{
    return \taskman_shell($cmd, $ret, $out);
}
Example #3
0
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) : ''));
    }
}