Skip to content

fix: tighten CLI error reporting for setup, typos, and VS Code opt-out - #1077

Draft
leoafarias wants to merge 2 commits into
mainfrom
claude/wonderful-feynman-snj9wt
Draft

leoafarias wants to merge 2 commits into
mainfrom
claude/wonderful-feynman-snj9wt

Conversation

@leoafarias

@leoafarias leoafarias commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes three small, confirmed bugs where FVM's output misreports what happened.

  • [BUG] Fail agressively when SDK setup fails (e.g. missing dependencies) #968: a failed SDK setup is no longer reported as success. SetupFlutterWorkflow ignored the exit code of flutter --version. For example, when unzip was missing, FVM printed ✓ ... is setup right after the error. It now throws an AppException ("Flutter SDK setup exited with code N. Fix the error above and try again.") on a non-zero exit, so fvm install and fvm use fail loudly.
  • [Feature Request] when we typo, show error #761: fvm fluter --version now reports an unknown command. The misspelled command landed in rest, while the trailing --version was parsed as the top-level flag, so FVM printed its own version. The version shortcut now applies only when rest is empty, and the base runner reports Could not find a command named "fluter" (exit 64).
  • [BUG] Do not warn when VS Code settings management is disabled #1048: no warning when updateVscodeSettings: false is set. This is an explicit opt-out, so the warning was just noise in local runs and CI. The message is now debug-only.

Closes #968, closes #761, closes #1048

Behavior change

fvm install / fvm use now exit non-zero when SDK setup fails. Before, they continued and later printed Flutter SDK is not setup, skipping resolve dependencies. Scripts that relied on the old exit 0 after a broken setup will now fail. --skip-setup / --no-setup still bypass setup.

Validation

  • Added regression tests: test/src/runner_test.dart, plus new cases in setup_flutter.workflow_test.dart and update_vscode_settings.workflow_test.dart. All three fail on main and pass with this change.
  • dart analyze --fatal-infos: no issues. CI (including dcm, integration, and migration jobs) was green on the first commit.
  • dart test -x 'sdk || network || git || integration || migration': 455 passed, 3 failed. The 3 failures are the existing file-permission tests, which also fail on unmodified main in the sandbox because it runs as root.
  • Self-review follow-up (second commit): the retry hint originally suggested fvm install <version.name>, which drops the fork prefix and is wrong when setup runs from fvm use. It now just says to fix the error and try again. I also removed a --version test that duplicated commands_test.dart.

Notes

- Fail `fvm install`/`fvm use` when Flutter SDK setup exits non-zero
  instead of reporting "is setup" after an error (#968)
- Report unknown commands such as `fvm fluter --version` as usage
  errors instead of printing the FVM version (#761)
- Stop warning when `updateVscodeSettings: false` is set; the opt-out
  is intentional configuration (#1048)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011SmK6LGRTwTTAD1GQuMw4q
@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
fvm Ready Ready Preview Sep 30, 2026 3:40pm UTC

The retry hint named `fvm install <name>`, which drops the fork prefix
and is wrong when setup runs from `fvm use`. Also drop a runner test
that duplicated the existing --version coverage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011SmK6LGRTwTTAD1GQuMw4q

This branch was successfully deployed

1 active deployment
Preview — 87b689c0 Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants