mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-27 19:35:13 +01:00
fix(cli): stubbed --install-service configures and exits with a notice
With the service step stubbed, an explicit --install-service fell through to a blocking foreground start under --yes. Skip the auto-start for that invocation and warn that the step is temporarily disabled, pointing at paperclipai install + paperclipai service install.
This commit is contained in:
1 parent
51f31cef5d
commit
d4894da7eb
1 file changed
+18
-2
@@ -462,8 +462,16 @@ export async function onboard(opts: OnboardOptions): Promise<void> {
|
||||
// (`paperclipai install`, then `paperclipai service install`) still works.
|
||||
// const serviceInstalled = await handleOnboardService(opts);
|
||||
const serviceInstalled = false;
|
||||
if (opts.installService === true) {
|
||||
p.log.warn(
|
||||
"The background service install during onboarding is temporarily disabled. Run `paperclipai install`, then `paperclipai service install`.",
|
||||
);
|
||||
}
|
||||
|
||||
let shouldRunNow = !serviceInstalled && (opts.run === true || opts.yes === true);
|
||||
// With the service step stubbed, an explicit --install-service must not
|
||||
// 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) })) {
|
||||
const answer = await p.confirm({
|
||||
message: "Start Paperclip now?",
|
||||
@@ -732,8 +740,16 @@ export async function onboard(opts: OnboardOptions): Promise<void> {
|
||||
// (`paperclipai install`, then `paperclipai service install`) still works.
|
||||
// const serviceInstalled = await handleOnboardService(opts);
|
||||
const serviceInstalled = false;
|
||||
if (opts.installService === true) {
|
||||
p.log.warn(
|
||||
"The background service install during onboarding is temporarily disabled. Run `paperclipai install`, then `paperclipai service install`.",
|
||||
);
|
||||
}
|
||||
|
||||
let shouldRunNow = !serviceInstalled && (opts.run === true || opts.yes === true);
|
||||
// With the service step stubbed, an explicit --install-service must not
|
||||
// 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) })) {
|
||||
const answer = await p.confirm({
|
||||
message: "Start Paperclip now?",
|
||||
|
||||
Reference in new issue
Block a user