From 1a8c48e83731debe08f65a236ef25ff09afa6fe4 Mon Sep 17 00:00:00 2001 From: taoky Date: Fri, 27 Dec 2024 23:30:22 +0800 Subject: [PATCH] ghcup: Adjust step 1 text format --- docs/ghcup.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/ghcup.md b/docs/ghcup.md index e34bb654..2b1e4f89 100644 --- a/docs/ghcup.md +++ b/docs/ghcup.md @@ -26,15 +26,18 @@ Stackage 源使用。 **第一步(可选)** :使用科大源安装 GHCup 本体。如已经安装 GHCup,可跳到下一步。 -Linux, FreeBSD, macOS 用户:在终端中运行如下命令 - ```bash - curl --proto '=https' --tlsv1.2 -sSf https://mirrors.ustc.edu.cn/ghcup/sh/bootstrap-haskell | BOOTSTRAP_HASKELL_YAML=https://mirrors.ustc.edu.cn/ghcup/ghcup-metadata/ghcup-0.0.8.yaml sh - ``` -Windows 用户:以非管理员身份在 PowerShell 中运行如下命令 - ```bash - $env:BOOTSTRAP_HASKELL_YAML = 'https://mirrors.ustc.edu.cn/ghcup/ghcup-metadata/ghcup-0.0.8.yaml' - Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://mirrors.ustc.edu.cn/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true - ``` +Linux, FreeBSD, macOS 用户:在终端中运行如下命令: + +```bash +curl --proto '=https' --tlsv1.2 -sSf https://mirrors.ustc.edu.cn/ghcup/sh/bootstrap-haskell | BOOTSTRAP_HASKELL_YAML=https://mirrors.ustc.edu.cn/ghcup/ghcup-metadata/ghcup-0.0.8.yaml sh +``` + +Windows 用户:以非管理员身份在 PowerShell 中运行如下命令: + +```powershell +$env:BOOTSTRAP_HASKELL_YAML = 'https://mirrors.ustc.edu.cn/ghcup/ghcup-metadata/ghcup-0.0.8.yaml' +Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://mirrors.ustc.edu.cn/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true +``` **第二步** :配置 GHCup 使用科大源。编辑 `~/.ghcup/config.yaml` 增加如下配置: