From f8afb7d5889f5c8b6ea256fd078fa8426d21c7be Mon Sep 17 00:00:00 2001 From: James O'Doherty Date: Sun, 7 Jun 2026 22:57:34 -0400 Subject: feat(cli): introduce explicit run/exec subcommands to prevent typo-execution Prevent the ambiguity where a mistyped subcommand was interpreted as the target wrapped process. - Introduce `run` and `exec` (alias) subcommands for launching wrapped processes. - Promote internal test commands (`test-ns`, `test-args`, `test-lifecycle`) to explicit subcommands. - Update CLI routing to return an error for unknown subcommands instead of falling back to the default execution path. - Update `README.md` usage examples and all test suites to use the new subcommand structure. --- tests/e2e/lifecycle_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/e2e/lifecycle_test.go') diff --git a/tests/e2e/lifecycle_test.go b/tests/e2e/lifecycle_test.go index d0d7271..8158593 100644 --- a/tests/e2e/lifecycle_test.go +++ b/tests/e2e/lifecycle_test.go @@ -76,7 +76,7 @@ func TestNamespaceLifecycleAutomation(t *testing.T) { t.Run("ReferenceCounting", func(t *testing.T) { // Start a process that exits quickly - cmd1 := exec.Command(binaryPath, "--profile", "default", "--", "sleep", "1.0") + cmd1 := exec.Command(binaryPath, "run", "--profile", "default", "--", "sleep", "1.0") cmd1.Env = SetEnvOverrides(map[string]string{"XDG_RUNTIME_DIR": tmpRuntimeDir}) cmd1.Stdout = os.Stdout cmd1.Stderr = os.Stderr @@ -88,7 +88,7 @@ func TestNamespaceLifecycleAutomation(t *testing.T) { waitForLifecycle(t, binaryPath, tmpRuntimeDir, "default", true) // Start a second process using the same profile with a longer sleep - cmd2 := exec.Command(binaryPath, "--profile", "default", "--", "sleep", "5.0") + cmd2 := exec.Command(binaryPath, "run", "--profile", "default", "--", "sleep", "5.0") cmd2.Env = SetEnvOverrides(map[string]string{"XDG_RUNTIME_DIR": tmpRuntimeDir}) cmd2.Stdout = os.Stdout cmd2.Stderr = os.Stderr -- cgit v1.2.3