diff options
| author | James O'Doherty <james@theodohertyfamily.com> | 2026-06-07 22:57:34 -0400 |
|---|---|---|
| committer | James O'Doherty <james@theodohertyfamily.com> | 2026-06-07 22:57:34 -0400 |
| commit | f8afb7d5889f5c8b6ea256fd078fa8426d21c7be (patch) | |
| tree | bb0683f4abdd22886ddb0b748114abff5dfef4d1 /tests/e2e/lifecycle_test.go | |
| parent | 7010768877c227c9410a06908e4cb3e54db403bd (diff) | |
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.
Diffstat (limited to 'tests/e2e/lifecycle_test.go')
| -rw-r--r-- | tests/e2e/lifecycle_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
