Commit 390598f
fix: default to cwd when --reach is used without explicit target (#1121)
* fix: default to cwd when --reach is used without explicit target
When `socket scan create --reach` is run without an explicit target path,
the CLI previously relied on an interactive prompt to ask the user to
confirm the current directory. In non-TTY environments (e.g. Jenkins CI),
the select() prompt silently fails because wrapPrompt swallows non-TypeError
errors, causing suggestTarget() to return [] and all reach validations to
fail with confusing "Input error: At least one TARGET (missing)" errors.
Now defaults to '.' (cwd) when --reach is used without a target, which is
consistent with --reach requiring exactly one directory target.
Also bumps @coana-tech/cli to 14.12.200 and CLI version to 1.1.74.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: default to cwd when --reach is used without explicit target
When `socket scan create --reach` is run without an explicit target path,
the CLI previously relied on an interactive prompt to ask the user to
confirm the current directory. In non-TTY environments (e.g. Jenkins CI),
the select() prompt silently fails because wrapPrompt swallows non-TypeError
errors, causing suggestTarget() to return [] and all reach validations to
fail with confusing "Input error: At least one TARGET (missing)" errors.
Now falls back to '.' (cwd) when the prompt returns empty, preserving the
interactive prompt for TTY users while gracefully handling non-TTY
environments.
Also bumps @coana-tech/cli to 14.12.200 and CLI version to 1.1.74.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 9692a36 commit 390598f
File tree
4 files changed
+25
-8
lines changed- src/commands/scan
4 files changed
+25
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
7 | 15 | | |
8 | 16 | | |
9 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
391 | 400 | | |
392 | 401 | | |
393 | 402 | | |
| |||
0 commit comments