fix: do not error out of shellIn if OS detection fails, and default platform on linux (#3600)

mine
henry 2025-10-05 22:09:25 +08:00 committed by GitHub
parent f824a3ed6f
commit 2daec83d60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -410,7 +410,8 @@ func resumeShellIn(a *App, c model.Component, path, co string) {
func shellIn(a *App, fqn, co string) error { func shellIn(a *App, fqn, co string) error {
platform, err := getPodOS(a.factory, fqn) platform, err := getPodOS(a.factory, fqn)
if err != nil { if err != nil {
return err slog.Warn("OS detection failed (assuming linux)", slogs.Error, err)
platform = "linux"
} }
args := computeShellArgs(fqn, co, a.Conn().Config().Flags(), platform) args := computeShellArgs(fqn, co, a.Conn().Config().Flags(), platform)