Skip to content

Commit ca465fc

Browse files
Merge pull request #27578 from limitedeternity/bugfix/27571_incorrect_volume_format
[Fixes: #27571] Fix 'shouldResolveWinPaths' returning 'false' on Windows
2 parents 16fae26 + a331c51 commit ca465fc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pkg/specgen/volumes_windows_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ func TestSplitVolumeString(t *testing.T) {
6767
},
6868
}
6969

70+
t.Run("shouldResolveWinPaths() returns true", func(t *testing.T) {
71+
assert.True(t, shouldResolveWinPaths())
72+
})
73+
7074
for _, tt := range tests {
7175
t.Run(tt.name, func(t *testing.T) {
7276
parts := SplitVolumeString(tt.volume)

pkg/specgen/winpath_linux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import (
66
)
77

88
func shouldResolveWinPaths() bool {
9-
return machine.HostType() == "wsl"
9+
hostType := machine.HostType()
10+
return hostType == machine.Wsl || hostType == machine.HyperV
1011
}
1112

1213
func shouldResolveUnixWinVariant(path string) bool {

0 commit comments

Comments
 (0)