Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 08:15 UTC
fix(cli): skip restart outro when no upgrade is available
The `return` inside the `useMakeSpinner` callback only exits the callback, not the outer `upgrade()` generator. This caused the misleading "Restart your terminal" outro to always display, even when the user is already on the latest version. Fix by returning a boolean from the spinner callback and conditionally showing the outro.
jkomyno committed
Feb 18, 2026 at 16:59 UTC
f1c2d7bb4ad603e6ce9622064eadc4709e15dc19
1 file changed
+7
-3
ts/packages/cli/src/services/upgrade-binary.ts
+7
-3
@@ -328,13 +328,13 @@ export class UpgradeBinary extends Effect.Service<UpgradeBinary>()('services/Upg
328
return;
329
}
330
331
- yield* ui.useMakeSpinner('Checking for updates...', spinner =>
331
+ const didUpgrade = yield* ui.useMakeSpinner('Checking for updates...', spinner =>
332
Effect.gen(function* () {
333
const release = yield* fetchLatestRelease();
334
const updateAvailable = yield* isUpdateAvailable(release);
335
if (!updateAvailable) {
336
yield* spinner.stop('You are already running the latest version!');
337
- return;
337
+ return false;
338
}
339
340
yield* spinner.message(
@@ -364,9 +364,13 @@ export class UpgradeBinary extends Effect.Service<UpgradeBinary>()('services/Upg
364
yield* replaceBinary(extractedBinaryPath, currentPath);
365
366
yield* spinner.stop('Upgrade completed!');
367
+ return true;
368
})
369
);
369
- yield* ui.outro('Restart your terminal to use the new version.');
370
+
371
+ if (didUpgrade) {
372
+ yield* ui.outro('Restart your terminal to use the new version.');
373
+ }
374
});
375
376
return {