File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,14 @@ func getLibpodTmpDir() string {
4242}
4343
4444// getDefaultMachineVolumes returns default mounted volumes (possibly with env vars, which will be expanded)
45+ // It is executed only if the machine provider is Hyper-V and it mimics WSL
46+ // behavior where the host %SystemDrive% (e.g. C:\) is automatically mounted
47+ // in the guest under /mnt/ (e.g. /mnt/c/)
4548func getDefaultMachineVolumes () []string {
4649 hd := homedir .Get ()
4750 vol := filepath .VolumeName (hd )
48- hostMnt := filepath . ToSlash ( strings .TrimPrefix ( hd , vol ) )
49- return []string {fmt .Sprintf ("%s:%s" , hd , hostMnt )}
51+ hostMnt := "/mnt/" + strings .ToLower ( vol [ 0 : 1 ] )
52+ return []string {fmt .Sprintf ("%s:%s" , vol + " \\ " , filepath . ToSlash ( hostMnt ) )}
5053}
5154
5255func getDefaultComposeProviders () []string {
You can’t perform that action at this time.
0 commit comments