mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
communicator/ssh: Fix crash using SSH+HTTP proxy
This commit is contained in:
parent
80792312d8
commit
0c435e2e08
@ -170,20 +170,20 @@ func (c *Communicator) Connect(o provisioners.UIOutput) (err error) {
|
||||
c.connInfo.BastionHostKey != "",
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
if c.connInfo.ProxyHost != "" {
|
||||
o.Output(fmt.Sprintf(
|
||||
"Using configured proxy host...\n"+
|
||||
" ProxyHost: %s\n"+
|
||||
" ProxyPort: %d\n"+
|
||||
" ProxyUserName: %s\n"+
|
||||
" ProxyUserPassword: %t",
|
||||
c.connInfo.ProxyHost,
|
||||
c.connInfo.ProxyPort,
|
||||
c.connInfo.ProxyUserName,
|
||||
c.connInfo.ProxyUserPassword != "",
|
||||
))
|
||||
if c.connInfo.ProxyHost != "" {
|
||||
o.Output(fmt.Sprintf(
|
||||
"Using configured proxy host...\n"+
|
||||
" ProxyHost: %s\n"+
|
||||
" ProxyPort: %d\n"+
|
||||
" ProxyUserName: %s\n"+
|
||||
" ProxyUserPassword: %t",
|
||||
c.connInfo.ProxyHost,
|
||||
c.connInfo.ProxyPort,
|
||||
c.connInfo.ProxyUserName,
|
||||
c.connInfo.ProxyUserPassword != "",
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
hostAndPort := fmt.Sprintf("%s:%d", c.connInfo.Host, c.connInfo.Port)
|
||||
|
Loading…
Reference in New Issue
Block a user