diff options
| author | OpportunityLiu <[email protected]> | 2019-08-30 17:22:18 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-08-30 17:22:18 +0800 |
| commit | 416efddbbac77ecad9be41bdafd36bdea89e25d5 (patch) | |
| tree | 0e9241715a63885d40833e419c9da0e4789b5171 | |
| parent | 27151c9ec191e0e9cfba633bec242fe70eb78a0b (diff) | |
fix script
| -rw-r--r-- | scripts/get.ps1 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/get.ps1 b/scripts/get.ps1 index 878ab1283..4ec3df140 100644 --- a/scripts/get.ps1 +++ b/scripts/get.ps1 @@ -142,7 +142,7 @@ param ( try { New-Item $(Split-Path $file -Parent) -ItemType Directory -Force | Out-Null - Set-Content $file $content + Set-Content $file $content -NoNewline } catch { writeErrorTip "Failed to append to profile!" writeErrorTip "Please try again as administrator" @@ -150,7 +150,7 @@ param ( } if ($content) { - $content = [System.Text.RegularExpressions.Regex]::Replace($content, "\n?(# PowerShell parameter completion shim for xmake)?\s*Register-ArgumentCompleter -Native -CommandName xmake -ScriptBlock\s*{.+?\n}\s*", "", [System.Text.RegularExpressions.RegexOptions]::Singleline) + $content = [System.Text.RegularExpressions.Regex]::Replace($content, "\n*(# PowerShell parameter completion shim for xmake)?\s*Register-ArgumentCompleter -Native -CommandName xmake -ScriptBlock\s*{.+?\n}\s*", "`n", [System.Text.RegularExpressions.RegexOptions]::Singleline) } try { $appendcontent = (Invoke-Webrequest 'https://raw.githubusercontent.com/xmake-io/xmake/master/scripts/register-completions.ps1' -UseBasicParsing).Content |
