mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-03-20 11:56:47 +08:00
fix: fallback of localRepository cache being nil (#29)
Doing `act --local-repository test/self-ref@main=/folder-path/self-ref` caused a null pointer exception while fetching a non mapped entry, due to missing remote fallback. Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/29 Co-authored-by: Christopher Homberger <christopher.homberger@web.de> Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
This commit is contained in:
committed by
ChristopherHX
parent
6c827eba95
commit
8505f73fe4
@@ -653,11 +653,13 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
|
||||
ContainerNetworkMode: docker_container.NetworkMode(input.networkName),
|
||||
Parallel: input.parallel,
|
||||
}
|
||||
actionCache := runner.GoGitActionCache{
|
||||
Path: config.ActionCacheDir,
|
||||
}
|
||||
config.ActionCache = &actionCache
|
||||
if input.actionOfflineMode {
|
||||
config.ActionCache = &runner.GoGitActionCacheOfflineMode{
|
||||
Parent: runner.GoGitActionCache{
|
||||
Path: config.ActionCacheDir,
|
||||
},
|
||||
Parent: actionCache,
|
||||
}
|
||||
}
|
||||
if len(input.localRepository) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user