Skip to content

Commit

Permalink
Improve reliability of Powershell installer
Browse files Browse the repository at this point in the history
  • Loading branch information
antonalekseev committed Apr 30, 2021
1 parent a273809 commit 89d36ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions assets/scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ function get_goarch {
if (-not $arch) {
if (Get-Command "Get-WmiObject" -ErrorAction SilentlyContinue) {
$wmi_arch = (Get-WmiObject -Class Win32_OperatingSystem | Select-Object *).OSArchitecture
if ($wmi_arch -eq "64-bit") {
if ($wmi_arch.StartsWith("64")) {
$arch = "X64";
} elseif ($wmi_arch -eq "32-bit") {
} elseif ($wmi_arch.StartsWith("32")) {
$arch = "X86";
}
}
Expand Down Expand Up @@ -311,4 +311,3 @@ try {
Remove-Item -LiteralPath $tempdir -Recurse -Force
}
}

2 changes: 1 addition & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ your dotfiles with the single command:
Or on systems with Powershell, you can use this command:

# To install in ./bin
(iwr https://git.io/chezmoi.ps1).Content | powershell -c -
(iwr -UseBasicParsing https://git.io/chezmoi.ps1).Content | powershell -c -

# To install in another location
'$params = "-BinDir ~/other"', (iwr https://git.io/chezmoi.ps1).Content | powershell -c -
Expand Down

0 comments on commit 89d36ec

Please sign in to comment.