@@ -45,7 +45,7 @@ def install_on_windows(non_interactive=False):
4545
4646 # 检查 npm 是否可用
4747 if not is_command_available ('npm' ):
48- print ("\n ✗ 未检测到 npm,正在尝试安装 Node.js..." )
48+ print ("\n [FAIL] 未检测到 npm,正在尝试安装 Node.js..." )
4949 print (" Windows 用户请手动安装 Node.js:" )
5050 print (" 下载地址: https://nodejs.org/" )
5151 return False
@@ -67,16 +67,16 @@ def install_on_windows(non_interactive=False):
6767 )
6868
6969 if result .returncode == 0 :
70- print ("\n ✓ 安装成功!" )
70+ print ("\n [OK] 安装成功!" )
7171 return True
7272 else :
73- print ("\n ✗ npm 安装失败" )
73+ print ("\n [FAIL] npm 安装失败" )
7474 if result .stderr :
7575 print (result .stderr )
7676 return False
7777
7878 except Exception as e :
79- print (f"\n ✗ 安装失败: { e } " )
79+ print (f"\n [FAIL] 安装失败: { e } " )
8080 return False
8181
8282def install_on_unix (non_interactive = False ):
@@ -86,11 +86,11 @@ def install_on_unix(non_interactive=False):
8686
8787 # 检查必要的命令
8888 if not is_command_available ('curl' ) and not is_command_available ('wget' ):
89- print ("\n ✗ 错误: 需要 curl 或 wget 命令" )
89+ print ("\n [FAIL] 错误: 需要 curl 或 wget 命令" )
9090 return False
9191
9292 if not is_command_available ('bash' ):
93- print ("\n ✗ 错误: 需要 bash" )
93+ print ("\n [FAIL] 错误: 需要 bash" )
9494 return False
9595
9696 # 选择下载工具
@@ -128,15 +128,15 @@ def install_on_unix(non_interactive=False):
128128 )
129129
130130 if download_result .returncode != 0 :
131- print (f"\n ✗ 下载失败: { download_result .stderr } " )
131+ print (f"\n [FAIL] 下载失败: { download_result .stderr } " )
132132 if not use_mirror :
133133 print ("\n 提示: 可以尝试使用国内镜像:" )
134134 print (" export USE_MIRROR=1" )
135135 print (" s-install" )
136136 return False
137137
138138 if not non_interactive :
139- print ("✓ 下载完成" )
139+ print ("[OK] 下载完成" )
140140
141141 # 添加执行权限
142142 os .chmod (temp_script , 0o755 )
@@ -166,21 +166,21 @@ def install_on_unix(non_interactive=False):
166166 if install_result .returncode == 0 :
167167 if not non_interactive :
168168 print ("=" * 60 )
169- print ("✓ 安装成功!" )
169+ print ("[OK] 安装成功!" )
170170 return True
171171 else :
172172 if not non_interactive :
173173 print ("=" * 60 )
174- print ("✗ 安装失败" )
174+ print ("[FAIL] 安装失败" )
175175 if non_interactive and install_result .stderr :
176176 print (install_result .stderr )
177177 return False
178178
179179 except subprocess .TimeoutExpired :
180- print ("\n ✗ 下载超时,请检查网络连接" )
180+ print ("\n [FAIL] 下载超时,请检查网络连接" )
181181 return False
182182 except Exception as e :
183- print (f"\n ✗ 安装过程出错: { e } " )
183+ print (f"\n [FAIL] 安装过程出错: { e } " )
184184 return False
185185
186186def install_serverless_devs (non_interactive = False ):
@@ -203,7 +203,7 @@ def install_serverless_devs(non_interactive=False):
203203 if is_installed :
204204 if non_interactive :
205205 # 非交互模式:已安装则跳过
206- print (f"✓ Serverless Devs 已安装: { version } " )
206+ print (f"[OK] Serverless Devs 已安装: { version } " )
207207 return True
208208 else :
209209 # 交互模式:询问是否重新安装
@@ -227,7 +227,7 @@ def install_serverless_devs(non_interactive=False):
227227
228228 is_installed , version = check_existing_installation ()
229229 if is_installed :
230- print (f"✓ 验证成功! 已安装版本: { version } " )
230+ print (f"[OK] 验证成功! 已安装版本: { version } " )
231231 if not non_interactive :
232232 print ("\n " + "=" * 60 )
233233 print ("安装完成! 请运行以下命令开始使用:" )
@@ -237,7 +237,7 @@ def install_serverless_devs(non_interactive=False):
237237 print ("=" * 60 )
238238 return True
239239 else :
240- print ("✗ 验证失败: 找不到 s 命令" )
240+ print ("[FAIL] 验证失败: 找不到 s 命令" )
241241 print ("\n 请尝试:" )
242242 print (" 1. 重新打开终端" )
243243 print (" 2. 运行: source ~/.bashrc (或 ~/.zshrc)" )
0 commit comments