feat: add update command and improve install method detection#81
Merged
felipefreitag merged 3 commits intomainfrom Mar 13, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
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( |
Contributor
There was a problem hiding this comment.
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>
Closed
vcapretz
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.