test(update): use errors.As in the check adapter harness

This commit is contained in:
sam committed 2026-09-12 02:59:52 +00:00
1 parent e8a17ad21b
commit 7668f473b5
1 file changed
+3 -1
+3 -1
View File
@@ -2,6 +2,7 @@ package releaseupdate
import (
"encoding/json"
"errors"
"os"
"os/exec"
"path/filepath"
@@ -62,7 +63,8 @@ func runUpdateCheckScript(t *testing.T, run checkRun) (Snapshot, []string, strin
)
output, err := cmd.Output()
var stderr string
if exitErr, ok := err.(*exec.ExitError); ok {
var exitErr *exec.ExitError
if errors.As(err, &exitErr) {
stderr = string(exitErr.Stderr)
}
var calls []string