diff --git a/provisioner/shell/provisioner.go b/provisioner/shell/provisioner.go index 5e9c587a1..de88e7632 100644 --- a/provisioner/shell/provisioner.go +++ b/provisioner/shell/provisioner.go @@ -105,7 +105,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { } if p.config.ExpectDisconnect == nil { - t := true + t := false p.config.ExpectDisconnect = &t } diff --git a/provisioner/shell/provisioner_test.go b/provisioner/shell/provisioner_test.go index ee0edf95b..b74fdbb13 100644 --- a/provisioner/shell/provisioner_test.go +++ b/provisioner/shell/provisioner_test.go @@ -32,8 +32,8 @@ func TestProvisionerPrepare_Defaults(t *testing.T) { t.Fatalf("err: %s", err) } - if *p.config.ExpectDisconnect != true { - t.Errorf("expected ExpectDisconnect to be true") + if *p.config.ExpectDisconnect != false { + t.Errorf("expected ExpectDisconnect to default to false") } if p.config.RemotePath == "" {