Skip to content

Commit 15fe963

Browse files
author
薛華慶, james.hsueh
committed
fix: add tty in install.sh
1 parent 7a67371 commit 15fe963

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

CODEX_SUPPORT_CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ GSI-Protocol 現在支援 **Codex (OpenAI)**!除了原有的 Claude Code 支
3737
- ✅ 支援同時安裝兩個平台
3838
- ✅ 自動處理兩個平台的目錄結構
3939
- ✅ 改進的安裝流程提示
40+
-**修復 `curl | bash` 輸入問題**(使用 `< /dev/tty`
4041

4142
**新功能:**
4243
```bash
@@ -46,6 +47,10 @@ GSI-Protocol 現在支援 **Codex (OpenAI)**!除了原有的 Claude Code 支
4647
3) Both Claude Code and Codex
4748
```
4849

50+
**技術修復:**
51+
- 所有 `read` 命令都加上 `< /dev/tty` 以支援管道執行
52+
- 確保 `curl -sSL ... | bash` 可以正常接收用戶輸入
53+
4954
### 2. `README.md` - 主要說明文件
5055
**更新內容:**
5156
- ✅ 更新專案描述,標註支援 Claude Code 和 Codex

install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ echo "Select AI platform(s) to install:"
1515
echo "1) Claude Code only"
1616
echo "2) Codex (OpenAI) only"
1717
echo "3) Both Claude Code and Codex"
18-
read -p "Enter choice [1-3]: " platform_choice
18+
read -p "Enter choice [1-3]: " platform_choice < /dev/tty
1919

2020
case $platform_choice in
2121
1)
@@ -48,7 +48,7 @@ else
4848
echo "Please choose installation type:"
4949
echo "1) Install to current directory (manual project)"
5050
echo "2) Install globally"
51-
read -p "Enter choice [1-2]: " choice
51+
read -p "Enter choice [1-2]: " choice < /dev/tty
5252

5353
case $choice in
5454
1)
@@ -134,7 +134,7 @@ TOTAL_FILES=0
134134
# Install Claude Code commands
135135
if [ "$INSTALL_CLAUDE" = true ]; then
136136
if [ -d ".claude/commands" ]; then
137-
read -p "⚠️ .claude/commands already exists. Overwrite? [y/N]: " confirm
137+
read -p "⚠️ .claude/commands already exists. Overwrite? [y/N]: " confirm < /dev/tty
138138
if [ "$confirm" != "y" ] && [ "$confirm" != "Y" ]; then
139139
echo "Skipping Claude Code installation."
140140
else
@@ -158,7 +158,7 @@ fi
158158
# Install Codex commands
159159
if [ "$INSTALL_CODEX" = true ]; then
160160
if [ -d ".codex/commands" ]; then
161-
read -p "⚠️ .codex/commands already exists. Overwrite? [y/N]: " confirm
161+
read -p "⚠️ .codex/commands already exists. Overwrite? [y/N]: " confirm < /dev/tty
162162
if [ "$confirm" != "y" ] && [ "$confirm" != "Y" ]; then
163163
echo "Skipping Codex installation."
164164
else

0 commit comments

Comments
 (0)