Skip to content

Commit ffde723

Browse files
committed
Simplify getRuntimePath by removing redundant checks for common runtime locations
1 parent d274c9e commit ffde723

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

internal/guest/vminit/runc/container.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,7 @@ func getRuntimePath() string {
4343
resolvedRuntimePath = path
4444
return
4545
}
46-
// Try common locations
47-
for _, p := range []string{"/sbin/crun", "/usr/bin/crun", "/usr/local/bin/crun", "/sbin/runc", "/usr/bin/runc"} {
48-
if _, err := os.Stat(p); err == nil {
49-
resolvedRuntimePath = p
50-
return
51-
}
52-
}
46+
5347
// Fallback to default
5448
resolvedRuntimePath = defaultRuntimePath
5549
})

0 commit comments

Comments
 (0)