File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ if (Test-EXEProgram -Name 'bun') {
3030 Install-PackageManagerApps - PackageManager ' bun' - ConfigPath $configPath
3131}
3232
33+ if (Test-EXEProgram - Name ' cargo' ) {
34+ Install-PackageManagerApps - PackageManager ' cargo' - ConfigPath $configPath
35+ } else {
36+ Write-Warning " 未检测到 Rust 环境 (Cargo),跳过 Rust 工具安装"
37+ Write-Host " 建议安装 Rust 以支持相关工具 (如 pwshfmt-rs):" - ForegroundColor Cyan
38+ Write-Host " curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh" - ForegroundColor Cyan
39+ }
40+
3341if ( -not (Test-EXEProgram - Name ' docker' )) {
3442 # bash ./ubuntu/installer/install_docker.sh
3543 bash ./ ubuntu/ installer/ installDocker.sh
Original file line number Diff line number Diff line change @@ -98,7 +98,10 @@ function Install-DevelopmentTools() {
9898 Install-PackageManagerApps - PackageManager " cargo" - ConfigPath $ConfigPath
9999 }
100100 else {
101- Write-Host " Cargo 未安装,跳过 Rust 工具安装" - ForegroundColor Yellow
101+ Write-Warning " 未检测到 Rust 环境 (Cargo),跳过 Rust 工具安装"
102+ Write-Host " 建议安装 Rust 以支持相关工具 (如 pwshfmt-rs):" - ForegroundColor Cyan
103+ Write-Host " 方式 1: 访问 https://rustup.rs/ 下载安装程序" - ForegroundColor Cyan
104+ Write-Host " 方式 2: winget install Rustlang.Rustup" - ForegroundColor Cyan
102105 }
103106
104107 Write-Host " 所有工具安装完成!" - ForegroundColor Green
You can’t perform that action at this time.
0 commit comments