@@ -228,22 +228,19 @@ export default {
228228 if ( ! [ 'windows' , 'linux' ] . includes ( os ) ) {
229229 throw new Error ( `Unexpected os of ${ os } ` ) ;
230230 }
231- let platDir , basename , parentDir , outFile , sourceFile , destFile ;
231+ let platDir , parentDir , outFile ;
232232
233233 if ( os === 'windows' ) {
234234 platDir = 'win32' ;
235235 parentDir = path . join ( this . srcDir , 'resources' , platDir , 'bin' ) ;
236- sourceFile = outFile = path . join ( parentDir , 'nerdctl.exe' ) ;
237- destFile = path . join ( parentDir , 'docker.exe' ) ;
236+ outFile = path . join ( parentDir , 'nerdctl.exe' ) ;
238237 } else {
239238 platDir = 'linux' ;
240239 parentDir = path . join ( this . srcDir , 'resources' , platDir , 'bin' ) ;
241- // nerdctl-stub is the actual nerdctl binary to be run on linux
240+ // nerdctl-stub is the actual nerdctl binary to be run on linux;
241+ // there is also a `nerdctl` wrapper in the same directory to make it
242+ // easier to handle permissions for Linux-in-WSL.
242243 outFile = path . join ( parentDir , 'nerdctl-stub' ) ;
243- // nerdctl is a shell script wrapper to point to the above nerdctl binary,
244- // hiding mount permissions from the linux/wsl-side user
245- sourceFile = path . join ( parentDir , 'nerdctl' ) ;
246- destFile = path . join ( parentDir , 'docker' ) ;
247244 }
248245 // The linux build produces both nerdctl-stub and nerdctl
249246 await this . spawn ( 'go' , 'build' , '-ldflags' , '-s -w' , '-o' , outFile , '.' , {
@@ -253,7 +250,6 @@ export default {
253250 GOOS : os ,
254251 }
255252 } ) ;
256- await fs . promises . copyFile ( sourceFile , destFile ) ;
257253 } ,
258254
259255 /**
0 commit comments