diff --git a/client.go b/client.go index 5e5ca2b1..28272d3c 100644 --- a/client.go +++ b/client.go @@ -249,9 +249,11 @@ func (c *Client) String() string { func (c *Client) Clone(opts ...ClientOption) *Client { options := c.options.Clone() options.Apply(opts...) - return &Client{ + clone := &Client{ options: options, } + clone.setup() + return clone } // Sudo returns a copy of the connection with a Runner that uses sudo.