Carry dependencies through pipeline commands
This commit is contained in:
@@ -184,10 +184,17 @@ func inspectPreviousArtifactReadiness(
|
||||
}
|
||||
|
||||
func inspectRemoteCurrentState(ctx context.Context, cfg *config.Config, store storage.ObjectStore) remoteCurrentStateCheck {
|
||||
return inspectRemoteCurrentStateWithDependencies(ctx, cfg, store, commandDependencies{
|
||||
discoverRemoteCurrentState: discoverRemoteCurrentStateFn,
|
||||
})
|
||||
}
|
||||
|
||||
func inspectRemoteCurrentStateWithDependencies(ctx context.Context, cfg *config.Config, store storage.ObjectStore, deps commandDependencies) remoteCurrentStateCheck {
|
||||
if store == nil {
|
||||
return remoteCurrentStateCheck{}
|
||||
}
|
||||
current, err := discoverRemoteCurrentStateFn(ctx, cfg, store)
|
||||
deps = normalizeCommandDependencies(deps)
|
||||
current, err := deps.discoverRemoteCurrentState(ctx, cfg, store)
|
||||
if err != nil {
|
||||
return remoteCurrentStateCheck{Err: err}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user