Skip to content

Restore fnm availability after suitup rewrites shell config#23

Merged
ChangeHow merged 5 commits intomainfrom
copilot/install-fnm-if-missing
Mar 20, 2026
Merged

Restore fnm availability after suitup rewrites shell config#23
ChangeHow merged 5 commits intomainfrom
copilot/install-fnm-if-missing

Conversation

Copy link
Contributor

Copilot AI commented Mar 20, 2026

  • Re-check the reviewer comment and confirm the remaining requested changes
  • Re-inspect the setup, frontend installer, and install.sh flows before editing
  • Fix fnm installation success/failure handling and add Homebrew fallback when available
  • Detect existing suitup-managed state and avoid preselecting already-completed setup steps
  • Add an init vs append choice to install.sh and cover it with focused tests
  • Run targeted tests for the touched areas, review the final diff, and update the PR title/comment reply

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix installation issue with fnm Restore fnm availability after suitup rewrites shell config Mar 20, 2026
Copilot AI requested a review from ChangeHow March 20, 2026 08:30
@ChangeHow
Copy link
Owner

@copilot 找到问题了,是因为安装失败了,你对安装失败判断不对啊:
┌ Suit up!

◇ Select setup steps:
│ Frontend Tools

◇ Starting installation...

◇ Installing fnm...
curl: (22) The requested URL returned error: 504

◆ fnm installed

失败了怎么还是 installed?失败了就尝试 brew,如果用户前面选择了 brew/或者本地有 brew。

完成改造之后帮我做下面三件事情:

  1. 更新最初始的选择,最好增加一个检测本地的 suitup 配置,根据已经设置完成的内容,把默认勾选的选项给反选上。
  2. curl 安装方式最前面增加 init 还是 append 模式,append 模式就是现在 cli 提供的增量脚本
  3. 完成上述所有任务之后,review 改动内容,然后更新合适的 PR 标题

Copilot AI and others added 3 commits March 20, 2026 08:47
Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
@ChangeHow ChangeHow marked this pull request as ready for review March 20, 2026 08:51
@ChangeHow ChangeHow merged commit 473992a into main Mar 20, 2026
1 check passed
Copy link
Contributor Author

Copilot AI commented Mar 20, 2026

@copilot 找到问题了,是因为安装失败了,你对安装失败判断不对啊:
┌ Suit up!

...

已处理,提交在 ec58484

现在 curl 安装 fnm 失败时不会再误报 success;如果本机有 brew,会自动 fallback 到 brew install fnm,否则会明确 warning 并跳过后续基于 fnm 的 Node 安装。setup 也会根据本地已完成的 suitup 配置/前端工具状态默认反选对应步骤,install.sh 现在会先让用户选 initappend

UI 截图可用这个链接: https://github.com/user-attachments/assets/f62fbda0-3704-4771-9d64-d6e6791f4cf7

我这边建议的 PR 标题更新为:Improve fnm install recovery and installer rerun defaults

Copilot stopped work on behalf of ChangeHow due to an error March 20, 2026 08:52
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