summaryrefslogtreecommitdiff
path: root/internal/cli/cli.go
diff options
context:
space:
mode:
authorJames O'Doherty <james@theodohertyfamily.com>2026-05-22 10:22:40 -0400
committerJames O'Doherty <james@theodohertyfamily.com>2026-05-22 10:22:40 -0400
commit401683a6b11e5a7810c949147a12f2c4bbfba48a (patch)
tree30e411bf7eefcb91e5f17921d42b63ba2f3a3fb5 /internal/cli/cli.go
parent5dbc46f3c1c75bf922bcc1c3df342323c23c04ce (diff)
feat: add argument verification diagnostic and secure temp files for launcher
Diffstat (limited to 'internal/cli/cli.go')
-rw-r--r--internal/cli/cli.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/internal/cli/cli.go b/internal/cli/cli.go
index 6118ee5..b315fba 100644
--- a/internal/cli/cli.go
+++ b/internal/cli/cli.go
@@ -18,19 +18,19 @@ func NewApp(args []string) *App {
}
func (a *App) Run() error {
- // 1. Ensure we are in an isolated network namespace
- if err := namespace.Bootstrap(); err != nil {
- return fmt.Errorf("namespace bootstrap failed: %w", err)
- }
-
- // Handle the internal diagnostic command first
- if len(a.Args) > 1 && a.Args[1] == "test-ns" {
- ok, msg := namespace.VerifyIsolation()
- if !ok {
- return fmt.Errorf("isolation check failed: %s", msg)
+ // Handle the internal diagnostic commands first
+ if len(a.Args) > 1 {
+ switch a.Args[1] {
+ case "test-ns":
+ ok, msg := namespace.VerifyIsolation()
+ if !ok {
+ return fmt.Errorf("isolation check failed: %s", msg)
+ }
+ fmt.Println("Isolation Verified: OK")
+ return nil
+ case "test-args":
+ return namespace.VerifyArguments(a.Args)
}
- fmt.Println("Isolation Verified: OK")
- return nil
}
// Handle subcommands first (profile list, import, configure, delete, stop)