Skip to content

Commit a09bad5

Browse files
authored
Merge pull request #2598 from Random-Liu/fix-state-error-handling
Fix `runc state` error handling.
2 parents 399dba5 + 7a4e080 commit a09bad5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runtime/v1/linux/proc/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func (p *Init) Status(ctx context.Context) (string, error) {
228228
defer p.mu.Unlock()
229229
c, err := p.runtime.State(ctx, p.id)
230230
if err != nil {
231-
if os.IsNotExist(err) {
231+
if strings.Contains(err.Error(), "does not exist") {
232232
return "stopped", nil
233233
}
234234
return "", p.runtimeError(err, "OCI runtime state failed")

0 commit comments

Comments
 (0)