File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -30,23 +30,23 @@ import (
3030 "github.com/nektos/act/pkg/model"
3131)
3232
33- func prepareLatestCommitInfo (ctx * context.Context ) {
33+ func prepareLatestCommitInfo (ctx * context.Context ) bool {
3434 commit , err := ctx .Repo .Commit .GetCommitByPath (ctx .Repo .TreePath )
3535 if err != nil {
3636 ctx .ServerError ("GetCommitByPath" , err )
37- return
37+ return false
3838 }
3939
40- if ! loadLatestCommitData (ctx , commit ) {
41- return
42- }
40+ return loadLatestCommitData (ctx , commit )
4341}
4442
4543func prepareToRenderFile (ctx * context.Context , entry * git.TreeEntry ) {
4644 ctx .Data ["IsViewFile" ] = true
4745 ctx .Data ["HideRepoInfo" ] = true
4846
49- prepareLatestCommitInfo (ctx )
47+ if ! prepareLatestCommitInfo (ctx ) {
48+ return
49+ }
5050
5151 // Don't call any other repository functions until the dataRc closed to
5252 // avoid create unnecessary temporary cat file.
You can’t perform that action at this time.
0 commit comments