private function wrapCommand($script)
{
$wrapper = 'Locally';
$tokens = ['script' => trim($script)];
if (!$this->is_local) {
$wrapper = 'OverSSH';
$tokens = array_merge($tokens, ['private_key' => $this->private_key, 'username' => $this->alternative_user ?: $this->server->user, 'port' => $this->server->port, 'ip_address' => $this->server->ip_address]);
}
$output = with(new Parser())->parseFile('RunScript' . $wrapper, $tokens);
Log::debug($output);
return $output;
}