mirror of
https://github.com/containers/podman.git
synced 2025-11-28 17:18:58 +08:00
[Fixes: #27571] Fix 'shouldResolveWinPaths' returning 'false' on Windows
Signed-off-by: Vyacheslav Bespalov <vbespalov@ptsecurity.com>
This commit is contained in:
@@ -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 {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
parts := SplitVolumeString(tt.volume)
|
parts := SplitVolumeString(tt.volume)
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func shouldResolveWinPaths() bool {
|
func shouldResolveWinPaths() bool {
|
||||||
return machine.HostType() == "wsl"
|
hostType := machine.HostType()
|
||||||
|
return hostType == machine.Wsl || hostType == machine.HyperV
|
||||||
}
|
}
|
||||||
|
|
||||||
func shouldResolveUnixWinVariant(path string) bool {
|
func shouldResolveUnixWinVariant(path string) bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user