Components_Qc_Task_Base::systemInDirectory PHP Method

systemInDirectory() protected method

Run a system call.
protected systemInDirectory ( string $call, string $target_dir ) : string
$call string The system call to execute.
$target_dir string Run the command in the provided target path.
return string The command output.
    protected function systemInDirectory($call, $target_dir)
    {
        if (!$this->getTasks()->pretend()) {
            $old_dir = getcwd();
            chdir($target_dir);
        }
        $result = $this->system($call);
        if (!$this->getTasks()->pretend()) {
            chdir($old_dir);
        }
        return $result;
    }