diff options
| author | Opportunity <[email protected]> | 2023-02-21 15:49:27 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-21 15:49:27 +0800 |
| commit | e9ffa9a0ebef6c5db90b3c9a83cc3c3add449290 (patch) | |
| tree | 82e3bed39182087cf8e421d61e51febbb2a45caf /scripts | |
| parent | 013efd7a212d87f8c21b15aca4bbbfab04725302 (diff) | |
Update get.ps1
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/get.ps1 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/get.ps1 b/scripts/get.ps1 index 6f850204b..8d94e2d51 100755 --- a/scripts/get.ps1 +++ b/scripts/get.ps1 @@ -151,7 +151,12 @@ param ( $content = $content -replace "`n# >>> xmake >>>`n[\S\s]*?`n# <<< xmake <<<`n", "" } try { - $appendcontent = (Invoke-Webrequest 'https://xmake.io/assets/scripts/pscompletions.text' -UseBasicParsing).Content + $url = if ($v -is [version]) { + "https://fastly.jsdelivr.net/gh/xmake-io/xmake@v$v/scripts/register-completions.ps1" + } else { + "https://fastly.jsdelivr.net/gh/xmake-io/xmake@$v/scripts/register-completions.ps1" + } + $appendcontent = (Invoke-Webrequest $url -UseBasicParsing).Content } catch { writeErrorTip 'Download failed!' writeErrorTip 'Check your network or... the news of S3 break' |
