场景:需要使用远程托管代码,需要安装Platform.sh
无效方案(仅本人电脑环境):
- curl安装
命令:curl -fsS https://platform.sh/cli/installer | php
弃用原因:file_get_contents() 无法请求https类资源,无法安装 - bash 安装
命令:curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | bash
弃用原因: Your OS (MINGW64_NT-10.0-26100) is currently not supported,windows上通过git bash不支持 - npm 安装
找不到包,弃用
最终使用Scoop 安装
- 安装Scoop
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop bucket add platformsh https://github.com/platformsh/homebrew-tap.git
scoop install platform
注意:需要使用非管理员运行的PowerShell
- 安装platformsh
scoop bucket add platformsh https://github.com/platformsh/homebrew-tap.git
scoop install platform
注意:如果第一条命令执行无法访问,可以尝试关闭vpn,如果第二条命令特别慢,或超时可以尝试开启vpn呢