Skip to content

Commit acbb69c

Browse files
committed
Fix bug on downloading job logs
1 parent c1b9ecc commit acbb69c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/common/actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func DownloadActionsRunJobLogsWithIndex(ctx *context.Base, ctxRepo *repo_model.R
2222
if err = runJobs.LoadRepos(ctx); err != nil {
2323
return fmt.Errorf("LoadRepos: %w", err)
2424
}
25-
if 0 < jobIndex || jobIndex >= int64(len(runJobs)) {
25+
if jobIndex < 0 || jobIndex >= int64(len(runJobs)) {
2626
return util.NewNotExistErrorf("job index is out of range: %d", jobIndex)
2727
}
2828
return DownloadActionsRunJobLogs(ctx, ctxRepo, runJobs[jobIndex])

0 commit comments

Comments
 (0)