mirror of https://github.com/k3s-io/k3s
Do not use sudo when untar node e2e tar ball.
parent
4495af3822
commit
a719a7d7e7
|
@ -93,7 +93,9 @@ func RunRemote(suite TestSuite, archive string, host string, cleanup bool, junit
|
|||
fmt.Sprintf("tar -xzvf ./%s", archiveName),
|
||||
)
|
||||
glog.V(2).Infof("Extracting tar on %q", host)
|
||||
if output, err := SSH(host, "sh", "-c", cmd); err != nil {
|
||||
// Do not use sudo here, because `sudo tar -x` will recover the file ownership inside the tar ball, but
|
||||
// we want the extracted files to be owned by the current user.
|
||||
if output, err := SSHNoSudo(host, "sh", "-c", cmd); err != nil {
|
||||
// Exit failure with the error
|
||||
return "", false, fmt.Errorf("failed to extract test archive: %v, output: %q", err, output)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue