Skip to content

Commit

Permalink
fix: account for error code 77 in rpm-ostree driver (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
gerblesh authored Feb 5, 2025
1 parent 642c338 commit 36785a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drv/rpmostree/rpmostree.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,14 @@ func (up RpmOstreeUpdater) Check() (bool, error) {

// This function may or may not be accurate, rpm-ostree updgrade --check has issues... https://github.com/coreos/rpm-ostree/issues/1579
// Not worried because we will end up removing rpm-ostree from the equation soon
cmd := exec.Command(up.BinaryPath, "upgrade", "--check")
cmd := exec.Command(up.BinaryPath, "upgrade", "--check", "--unchanged-exit-77")
out, err := cmd.CombinedOutput()
if err != nil {
if cmd.ProcessState.ExitCode() == 77 {
// Exit code 77 indicates no update is available
up.Config.Logger.Debug("Executed update check", slog.String("output", string(out)), slog.Bool("update", false))
return false, nil
}
return true, err
}

Expand Down

0 comments on commit 36785a8

Please sign in to comment.