@@ -67,7 +67,7 @@ func stopVM(ctx context.Context, distroName string) error {
67
67
var limaBoot string
68
68
69
69
// provisionVM starts Lima's boot process inside an already imported VM.
70
- func provisionVM (ctx context.Context , instanceDir , instanceName , distroName string , errCh * chan error ) error {
70
+ func provisionVM (ctx context.Context , instanceDir , instanceName , distroName string , errCh chan <- error ) error {
71
71
ciDataPath := filepath .Join (instanceDir , filenames .CIDataISODir )
72
72
m := map [string ]string {
73
73
"CIDataPath" : ciDataPath ,
@@ -120,7 +120,7 @@ func provisionVM(ctx context.Context, instanceDir, instanceName, distroName stri
120
120
os .RemoveAll (limaBootFileWinPath )
121
121
logrus .Debugf ("%v: %q" , cmd .Args , string (out ))
122
122
if err != nil {
123
- * errCh <- fmt .Errorf (
123
+ errCh <- fmt .Errorf (
124
124
"error running wslCommand that executes boot.sh (%v): %w, " +
125
125
"check /var/log/lima-init.log for more details (out=%q)" , cmd .Args , err , string (out ))
126
126
}
@@ -139,7 +139,7 @@ func provisionVM(ctx context.Context, instanceDir, instanceName, distroName stri
139
139
}
140
140
141
141
// keepAlive runs a background process which in order to keep the WSL2 VM running in the background after launch.
142
- func keepAlive (ctx context.Context , distroName string , errCh * chan error ) {
142
+ func keepAlive (ctx context.Context , distroName string , errCh chan <- error ) {
143
143
keepAliveCmd := exec .CommandContext (
144
144
ctx ,
145
145
"wsl.exe" ,
@@ -152,7 +152,7 @@ func keepAlive(ctx context.Context, distroName string, errCh *chan error) {
152
152
153
153
go func () {
154
154
if err := keepAliveCmd .Run (); err != nil {
155
- * errCh <- fmt .Errorf (
155
+ errCh <- fmt .Errorf (
156
156
"error running wsl keepAlive command: %w" , err )
157
157
}
158
158
}()
0 commit comments