Added remote artifact listing to narratio status

This commit is contained in:
2026-05-21 20:49:28 -05:00
parent 870c2d69d5
commit 3752f3ed28
4 changed files with 95 additions and 0 deletions

View File

@@ -208,6 +208,23 @@ func Status(ctx context.Context, args []string, out io.Writer) error {
}
locks, err := loadEffectiveLocks(ctx, cfg, store)
if catalog, catalogErr := buildHelperArtifactCatalog(cfg); catalogErr != nil {
fmt.Fprintf(out, "Remote outputs: error: %v\n", catalogErr)
} else if storeErr == nil {
catalogLocks := locks
if err != nil {
catalogLocks = &effectiveLocks{
Static: staticArchiveLocks(cfg),
All: staticArchiveLocks(cfg),
}
}
remoteState := map[string]string{}
if store != nil {
remoteState = remoteArtifactAvailability(ctx, cfg, store, catalog)
}
fmt.Fprintln(out, "Remote outputs:")
writeArtifactList(out, cfg, catalog, catalogLocks, remoteState)
}
if err != nil {
fmt.Fprintf(out, "Archive locks: error: %v\n", err)
} else {