summaryrefslogtreecommitdiff
path: root/pkg/machine/wsl/machine.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/machine/wsl/machine.go')
-rw-r--r--pkg/machine/wsl/machine.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/machine/wsl/machine.go b/pkg/machine/wsl/machine.go
index 9a57102f0..8f6ef7a43 100644
--- a/pkg/machine/wsl/machine.go
+++ b/pkg/machine/wsl/machine.go
@@ -364,14 +364,6 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) {
return false, err
}
- if err := v.writeConfig(); err != nil {
- return false, err
- }
-
- if err := setupConnections(v, opts, sshDir); err != nil {
- return false, err
- }
-
dist, err := provisionWSLDist(v)
if err != nil {
return false, err
@@ -393,6 +385,14 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) {
// Cycle so that user change goes into effect
_ = terminateDist(dist)
+ if err := v.writeConfig(); err != nil {
+ return false, err
+ }
+
+ if err := setupConnections(v, opts, sshDir); err != nil {
+ return false, err
+ }
+
return true, nil
}