fix(go): correctly replace binary on build

This commit is contained in:
Jan De Dobbeleer 2022-12-16 18:36:21 +01:00 committed by Jan De Dobbeleer
parent 8e39ff6a82
commit ee13e9c50e

View file

@ -14,6 +14,7 @@ runs:
- name: Override Go ♻️ - name: Override Go ♻️
shell: pwsh shell: pwsh
run: | run: |
New-Item -Path ./bin -ItemType Directory $goBin = $(Get-Command go).Source
Invoke-WebRequest 'https://github.com/jandedobbeleer/go/releases/download/1.19.4/go' -OutFile "$env:GOROOT/bin/go" Invoke-WebRequest 'https://github.com/jandedobbeleer/go/releases/download/1.19.4/go' -OutFile "$goBin"
chmod a+x "$env:GOROOT/bin/go" 2>&1 chmod a+x $goBin 2>&1
go version