Permit safe cross-run output declarations
This commit is contained in:
@@ -58,11 +58,13 @@ func Status(ctx context.Context, args []string, out io.Writer) error {
|
||||
|
||||
store, storeErr := objectStoreIfConfigured(ctx, cfg)
|
||||
var remoteCurrent *RemoteCurrentState
|
||||
var remoteCurrentErr error
|
||||
if storeErr != nil {
|
||||
fmt.Fprintf(out, "Remote publish: unavailable: %v\n", storeErr)
|
||||
} else if store != nil {
|
||||
current := inspectRemoteCurrentState(ctx, cfg, store)
|
||||
if current.Err != nil {
|
||||
remoteCurrentErr = current.Err
|
||||
fmt.Fprintf(out, "Remote publish: missing or unavailable: %v\n", current.Err)
|
||||
} else {
|
||||
remoteCurrent = current.State
|
||||
@@ -97,7 +99,11 @@ func Status(ctx context.Context, args []string, out io.Writer) error {
|
||||
}
|
||||
publishedRemoteState := map[string]string{}
|
||||
if store != nil {
|
||||
publishedRemoteState = remotePublishedOutputAvailabilityForCurrent(ctx, cfg, store, catalog, remoteCurrent)
|
||||
if remoteCurrentErr != nil {
|
||||
publishedRemoteState = unresolvedRemotePublishedOutputAvailability(cfg, catalog, "remote=error")
|
||||
} else {
|
||||
publishedRemoteState = remotePublishedOutputAvailabilityForCurrent(ctx, cfg, store, catalog, remoteCurrent)
|
||||
}
|
||||
}
|
||||
fmt.Fprintln(out, "Remote outputs:")
|
||||
writeArtifactList(out, cfg, catalog, catalogLocks, publishedRemoteState)
|
||||
|
||||
Reference in New Issue
Block a user