Skip to content

Commit

Permalink
Merge pull request #8907 from sharifelgamal/external-ssh
Browse files Browse the repository at this point in the history
respect native-ssh flag
  • Loading branch information
tstromberg authored Sep 2, 2020
2 parents f8358d6 + 43101f2 commit d66a8e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,17 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing *
}
}

mRunner, preExists, mAPI, host, err := node.Provision(&cc, &n, true, viper.GetBool(deleteOnFailure))
if err != nil {
return node.Starter{}, err
}

if viper.GetBool(nativeSSH) {
ssh.SetDefaultClient(ssh.Native)
} else {
ssh.SetDefaultClient(ssh.External)
}

mRunner, preExists, mAPI, host, err := node.Provision(&cc, &n, true, viper.GetBool(deleteOnFailure))
if err != nil {
return node.Starter{}, err
}

return node.Starter{
Runner: mRunner,
PreExists: preExists,
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/machine/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ func CreateSSHShell(api libmachine.API, cc config.ClusterConfig, n config.Node,
return errors.Errorf("%q is not running", machineName)
}

client, err := host.CreateSSHClient()

if native {
ssh.SetDefaultClient(ssh.Native)
} else {
ssh.SetDefaultClient(ssh.External)
}

client, err := host.CreateSSHClient()

if err != nil {
return errors.Wrap(err, "Creating ssh client")
}
Expand Down

0 comments on commit d66a8e6

Please sign in to comment.