0
0
forked from toolshed/abra

fix: stream output from remote ssh commands

This commit is contained in:
2021-10-26 01:30:10 +02:00
parent aec11bda28
commit 066b2b9373
2 changed files with 132 additions and 4 deletions

View File

@ -225,14 +225,12 @@ func installDocker(c *cli.Context, cl *dockerClient.Client, sshCl *simplessh.Cli
return err
}
logrus.Debugf("running '%s' on %s now with sudo password", cmd, domainName)
_, err := sshCl.ExecSudo(cmd, sudoPass)
if err != nil {
if err := ssh.RunSudoCmd(cmd, sudoPass, sshCl); err != nil {
return err
}
} else {
logrus.Debugf("running '%s' on %s now without sudo password", cmd, domainName)
_, err := sshCl.Exec(cmd)
if err != nil {
if err := ssh.Exec(cmd, sshCl); err != nil {
return err
}
}