feat(depot): status/push/verify/get/pull commands with exit-code contract
Adds internal/depot.Run, the stdlib-flag command surface for the five depot subcommands (0/1/2/64/70 exit contract), plus a dispatch special case that will route "crucible depot ..." and crucible-depot to it once Task 6 flips Wired:true (inert for now since Wired stays false). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
|
||||
"git.westgate.pw/ShadowsOverWestgate/sow-tools/internal/app"
|
||||
"git.westgate.pw/ShadowsOverWestgate/sow-tools/internal/buildinfo"
|
||||
"git.westgate.pw/ShadowsOverWestgate/sow-tools/internal/depot"
|
||||
"git.westgate.pw/ShadowsOverWestgate/sow-tools/internal/menu"
|
||||
)
|
||||
|
||||
@@ -365,6 +366,12 @@ func runBuilder(name string, args []string, out, errw io.Writer) int {
|
||||
return exitOK
|
||||
}
|
||||
}
|
||||
if b.Name == "depot" && b.Wired {
|
||||
// depot parses its own subcommand (status/push/verify/get/pull) and
|
||||
// has its own richer exit contract (0/1/2/64/70), so it bypasses the
|
||||
// b.Commands/delegateLegacy routing entirely.
|
||||
return depot.Run(args, out, errw, os.Getenv)
|
||||
}
|
||||
if !b.Wired {
|
||||
// No migrated logic yet (depot): fail closed, never fake an artifact.
|
||||
fmt.Fprintf(errw, unwiredMsg, b.Name, b.Bin)
|
||||
|
||||
Reference in New Issue
Block a user