From a331c51c058ecb164cfc365918d3522ed32ea7aa Mon Sep 17 00:00:00 2001 From: Vyacheslav Bespalov Date: Fri, 21 Nov 2025 12:23:29 +0300 Subject: [PATCH] [Fixes: #27571] Fix 'shouldResolveWinPaths' returning 'false' on Windows Signed-off-by: Vyacheslav Bespalov --- pkg/specgen/volumes_windows_test.go | 4 ++++ pkg/specgen/winpath_linux.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/specgen/volumes_windows_test.go b/pkg/specgen/volumes_windows_test.go index e59aae29b4..1a0caeef18 100644 --- a/pkg/specgen/volumes_windows_test.go +++ b/pkg/specgen/volumes_windows_test.go @@ -67,6 +67,10 @@ func TestSplitVolumeString(t *testing.T) { }, } + t.Run("shouldResolveWinPaths() returns true", func(t *testing.T) { + assert.True(t, shouldResolveWinPaths()) + }) + for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { parts := SplitVolumeString(tt.volume) diff --git a/pkg/specgen/winpath_linux.go b/pkg/specgen/winpath_linux.go index 8244af0445..ceb917a74d 100644 --- a/pkg/specgen/winpath_linux.go +++ b/pkg/specgen/winpath_linux.go @@ -6,7 +6,8 @@ import ( ) func shouldResolveWinPaths() bool { - return machine.HostType() == "wsl" + hostType := machine.HostType() + return hostType == machine.Wsl || hostType == machine.HyperV } func shouldResolveUnixWinVariant(path string) bool {