Skip to content

Commit

Permalink
fix: handle empty release file path during cronjob execution (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ns2Kracy authored Sep 3, 2024
1 parent 95434ea commit c4c1a6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion service/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ func DownloadRelease(ctx context.Context, release codegen.Release, force bool) (
var mirror string

remainingSpace, _ := internal.GetRemainingSpace(config.RAUC_RELEASE_PATH)
logger.Info("remaining space", zap.Uint64("remaining_space", remainingSpace))
packageURL := ""

for _, mirror = range release.Mirrors {
Expand Down
4 changes: 3 additions & 1 deletion service/status_serivce.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ func (r *StatusService) Cronjob(ctx context.Context, sysRoot string) error {
}

if releaseFilePath == "" {
logger.Error("release file path is empty")
if shouldUpgrade {
logger.Error("release file path is empty")
}
} else {
releaseDir := filepath.Dir(releaseFilePath)
latestReleaseDir := filepath.Join(filepath.Dir(releaseDir), "latest")
Expand Down

0 comments on commit c4c1a6d

Please sign in to comment.