Skip to content

feat: add update command and improve install method detection#81

Merged
felipefreitag merged 3 commits intomainfrom
feat/add-update-command-and-improve-detection
Mar 13, 2026
Merged

feat: add update command and improve install method detection#81
felipefreitag merged 3 commits intomainfrom
feat/add-update-command-and-improve-detection

Conversation

@felipefreitag
Copy link
Contributor

No description provided.

@felipefreitag felipefreitag requested a review from vcapretz March 13, 2026 14:26
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/commands/update.ts">

<violation number="1" location="src/commands/update.ts:44">
P2: Return the standard CLI error envelope here instead of a custom JSON object. This branch exits with code 1, but `--json`/non-TTY callers will not receive the documented `error.message` and `error.code` fields.</violation>
</file>

<file name="tests/lib/update-check.test.ts">

<violation number="1" location="tests/lib/update-check.test.ts:236">
P2: Make this install-script assertion platform-aware; it currently fails on Windows where `detectInstallMethod()` returns the PowerShell command instead of a `curl` command.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/commands/update.ts">

<violation number="1" location="src/commands/update.ts:38">
P1: This switches update-check failures from stdout JSON to stderr, which breaks the documented machine-mode contract for non-interactive `resend update` calls.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


if (!latest) {
spinner?.fail('Could not check for updates');
outputError(
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: This switches update-check failures from stdout JSON to stderr, which breaks the documented machine-mode contract for non-interactive resend update calls.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/commands/update.ts, line 38:

<comment>This switches update-check failures from stdout JSON to stderr, which breaks the documented machine-mode contract for non-interactive `resend update` calls.</comment>

<file context>
@@ -35,18 +35,10 @@ Shows the current version, latest version, and how to upgrade.`,
-        );
-      }
-      process.exit(1);
+      outputError(
+        { message: 'Could not reach GitHub releases', code: 'fetch_failed' },
+        { json: globalOpts.json },
</file context>
Fix with Cubic

@felipefreitag felipefreitag merged commit 754aa06 into main Mar 13, 2026
6 checks passed
@felipefreitag felipefreitag deleted the feat/add-update-command-and-improve-detection branch March 13, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants