Skip to content

Restore interactive terminal input for install.sh in curl | bash installs#22

Merged
ChangeHow merged 2 commits intomainfrom
copilot/fix-installation-errors
Mar 20, 2026
Merged

Restore interactive terminal input for install.sh in curl | bash installs#22
ChangeHow merged 2 commits intomainfrom
copilot/fix-installation-errors

Conversation

Copy link
Contributor

Copilot AI commented Mar 20, 2026

  • Review the new PR comment and determine whether it needs a code change or an explanation
  • Inspect the install launcher and related test coverage to confirm the root cause
  • Reply on the PR thread with a concise explanation if no code changes are needed

💡 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.

@ChangeHow
Copy link
Owner

@copilot #21 这是关联改动

Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix installation errors in suitup setup Restore interactive terminal input for install.sh in curl | bash installs Mar 20, 2026
Copilot AI requested a review from ChangeHow March 20, 2026 08:14
@ChangeHow
Copy link
Owner

@copilot 是什么原因导致的这个问题?

@ChangeHow ChangeHow marked this pull request as ready for review March 20, 2026 08:15
Copy link
Contributor Author

Copilot AI commented Mar 20, 2026

@copilot 是什么原因导致的这个问题?

因为 curl ... | bash 这种调用方式里,bash 的标准输入就是那条管道本身。之前 install.sh 再启动 zsh -> node src/cli.js 时,没有把 stdin 切回用户终端,所以子进程继承到的仍然是管道输入,而不是交互式 TTY。这样 @clack/prompts 在渲染完检查项后继续读输入时,拿到的是被管道占用/读完的 stdin,交互就失效了。现在这里显式加了 < /dev/tty,把 stdin 重新接回当前终端,就能正常交互了。

@ChangeHow ChangeHow merged commit 48ff534 into main Mar 20, 2026
3 checks passed
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