AwsInspector\Ssh\Command::getCommandString PHP Method

getCommandString() protected method

protected getCommandString ( )
    protected function getCommandString()
    {
        $command = $this->command;
        if ($this->asUser) {
            $command = sprintf('sudo -u %s bash -c %s', escapeshellarg($this->asUser), escapeshellarg($command));
        }
        return $command;
    }