mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-27 11:20:42 +01:00
fix(cli): inert --install-service also skips the start prompt
On an interactive terminal the stubbed flag still reached the "Start Paperclip now?" prompt, so a PTY-driven automation run could hang waiting for input. Treat an explicit --install-service as an already decided start at both sites: configure, warn, exit.
This commit is contained in:
1 parent
d4894da7eb
commit
45ac13cd7d
1 file changed
+2
-2
@@ -472,7 +472,7 @@ export async function onboard(opts: OnboardOptions): Promise<void> {
|
||||
// fall through to a blocking foreground start: configure and exit so
|
||||
// scripted installs fail fast instead of hanging.
|
||||
let shouldRunNow = !serviceInstalled && opts.installService !== true && (opts.run === true || opts.yes === true);
|
||||
if (shouldOfferForegroundStart({ serviceInstalled, startAlreadyDecided: shouldRunNow, invokedByRun: opts.invokedByRun === true, interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY) })) {
|
||||
if (shouldOfferForegroundStart({ serviceInstalled, startAlreadyDecided: shouldRunNow || opts.installService === true, invokedByRun: opts.invokedByRun === true, interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY) })) {
|
||||
const answer = await p.confirm({
|
||||
message: "Start Paperclip now?",
|
||||
initialValue: true,
|
||||
@@ -750,7 +750,7 @@ export async function onboard(opts: OnboardOptions): Promise<void> {
|
||||
// fall through to a blocking foreground start: configure and exit so
|
||||
// scripted installs fail fast instead of hanging.
|
||||
let shouldRunNow = !serviceInstalled && opts.installService !== true && (opts.run === true || opts.yes === true);
|
||||
if (shouldOfferForegroundStart({ serviceInstalled, startAlreadyDecided: shouldRunNow, invokedByRun: opts.invokedByRun === true, interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY) })) {
|
||||
if (shouldOfferForegroundStart({ serviceInstalled, startAlreadyDecided: shouldRunNow || opts.installService === true, invokedByRun: opts.invokedByRun === true, interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY) })) {
|
||||
const answer = await p.confirm({
|
||||
message: "Start Paperclip now?",
|
||||
initialValue: true,
|
||||
|
||||
Reference in new issue
Block a user