1
0

fix: set internal error on module scp connection refused

This commit is contained in:
dump_stack() 2023-05-25 11:04:30 +00:00
parent a646e9cf33
commit 301e2fde1a
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

4
pew.go
View File

@ -493,6 +493,10 @@ func copyArtifactAndTest(slog zerolog.Logger, q *qemu.System, ka config.Artifact
res.Run.Output, err = q.CopyAndInsmod(res.BuildArtifact) res.Run.Output, err = q.CopyAndInsmod(res.BuildArtifact)
if err != nil { if err != nil {
slog.Error().Err(err).Msg(res.Run.Output) slog.Error().Err(err).Msg(res.Run.Output)
// TODO errors.As
if strings.Contains(err.Error(), "connection refused") {
res.InternalError = err
}
return return
} }
res.Run.Ok = true res.Run.Ok = true