-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix error when determining GOARCH in install.ps1 #3751
Conversation
33087ee
to
e269c0c
Compare
❯ docker run -it mcr.microsoft.com/windows:ltsc2019
Microsoft Windows [Version 10.0.17763.5696]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\>powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\> iex "&{$(irm 'https://raw.githubusercontent.com/twpayne/chezmoi/07f80802ad17b23fdac364541ee279252230418e/assets/scripts/install.ps1')} -d"
DEBUG: BinDir: C:\bin
DEBUG: Tag: latest
DEBUG: ChezmoiArgs:
DEBUG: tempDir: C:\Users\ContainerAdministrator\AppData\Local\Temp\91d3e380-fbd0-46cc-beea-705ca8fd63f7
DEBUG: goOS: windows
DEBUG: goArch: amd64
DEBUG: checking GitHub for tag latest
DEBUG: found tag v2.48.1 for latest
found version 2.48.1 for latest/windows/amd64
DEBUG: binarySuffix: .exe
DEBUG: archiveFormat: zip
DEBUG: goOSExtra:
DEBUG: archiveFilename: chezmoi_2.48.1_windows_amd64.zip
DEBUG: tempArchivePath: C:\Users\ContainerAdministrator\AppData\Local\Temp\91d3e380-fbd0-46cc-beea-705ca8fd63f7\chezmoi_2.48.1_windows_amd64.zip
DEBUG: downloading https://github.com/twpayne/chezmoi/releases/download/v2.48.1/chezmoi_2.48.1_windows_amd64.zip
DEBUG: downloading https://github.com/twpayne/chezmoi/releases/download/v2.48.1/chezmoi_2.48.1_checksums.txt as string
DEBUG: extracting C:\Users\ContainerAdministrator\AppData\Local\Temp\91d3e380-fbd0-46cc-beea-705ca8fd63f7\chezmoi_2.48.1_windows_amd64.zip to C:\Users\ContainerAdministrator\AppData\Local\Temp\91d3e380-fbd0-46cc-beea-705ca8fd63f7
DEBUG: binaryFilename: chezmoi.exe
DEBUG: tempBinaryPath: C:\Users\ContainerAdministrator\AppData\Local\Temp\91d3e380-fbd0-46cc-beea-705ca8fd63f7\chezmoi.exe
DEBUG: binary: C:\bin\chezmoi.exe
installed C:\bin\chezmoi.exe
DEBUG: removing C:\Users\ContainerAdministrator\AppData\Local\Temp\91d3e380-fbd0-46cc-beea-705ca8fd63f7 |
6df92b8
to
07f8080
Compare
Gentle ping on this. I think you're waiting for action from me to merge this, but I'm not sure what that action is :) |
I forgot about this. I was actually hoping you or @pmolodo could test it, as I still can only reproduce the issue in a Docker container, but it's just dawned on me that I forgot to actually ask for it to be tested. The old code tries the cross-platform solutions first, which we have since discovered can throw an error on some versions of PowerShell and/or Windows. It assumes that, if the cross-platform solutions fail, the script must be running under Windows PowerShell. The new code adds a check for the |
07f8080
to
8f521d0
Compare
8f521d0
to
24dfb01
Compare
Fixes #3749.