public function getCommand() : string
    {
        $amount = count($this->commands);
        if ($amount < 1) {
            throw new RuntimeException('no command to execute');
        }
        $cmd = $this->getPipeFail()
             . ($amount > 1 ? '(' . implode(' && ', $this->commands) . ')' : $this->commands[0])
             . $this->getPipeline()
             . (!empty($this->redirectOutput) ? ' > ' . $this->redirectOutput : '');

        return $cmd;
    }