feat: Add the vantagectl restore and verify subcommands

--force requires a typed database name on a terminal and --confirm-db
without one, so a copy-pasted restore command carries its intended target
and cannot destroy a different database.

Also silences cobra's own error print (root.go) so a failure is reported
once by main.go instead of twice, and pins the Changed()-based env
fallback in resolveGlobals with a test for an explicitly empty --db.
This commit is contained in:
2026-09-07 14:04:25 +00:00
parent 92ce0b3e5b
commit e30b25b2bc
7 changed files with 311 additions and 5 deletions
+2
View File
@@ -8,6 +8,7 @@ require (
gitea.hostxtra.co.uk/mrhid6/vantage/shared v0.0.0-00010101000000-000000000000
github.com/spf13/cobra v1.10.2
go.mongodb.org/mongo-driver/v2 v2.8.0
golang.org/x/term v0.45.0
)
require (
@@ -20,5 +21,6 @@ require (
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
golang.org/x/crypto v0.54.0 // indirect
golang.org/x/sync v0.22.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/text v0.40.0 // indirect
)