Fix SSH Host argument in tag command during scp.

[NO NEW TESTS NEEDED]

Signed-off-by: Gordon Messmer <gordon.messmer@gmail.com>
This commit is contained in:
Gordon Messmer
2024-01-29 16:27:30 -08:00
parent 34e9146f63
commit f8e1ea4140

View File

@ -238,7 +238,7 @@ func LoadToRemote(dest entities.ImageScpOptions, localFile string, tag string, u
outArr := strings.Split(rep, " ")
id := outArr[len(outArr)-1]
if len(dest.Tag) > 0 { // tag the remote image using the output ID
_, err := ssh.Exec(&ssh.ConnectionExecOptions{Host: url.Hostname(), Identity: iden, Port: port, User: url.User, Args: []string{"podman", "image", "tag", id, dest.Tag}}, sshEngine)
_, err := ssh.Exec(&ssh.ConnectionExecOptions{Host: url.String(), Identity: iden, Port: port, User: url.User, Args: []string{"podman", "image", "tag", id, dest.Tag}}, sshEngine)
if err != nil {
return "", "", err
}