Skip to content

Commit

Permalink
internal/build: fix build on latest windows
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Nov 24, 2023
1 parent 5fa8c79 commit 4ac5006
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/build-test.yml
Expand Up @@ -34,13 +34,25 @@ jobs:

needs: lint
steps:
- uses: actions/checkout@v2
steps:

- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.20.5
- name: Install Submodules
run: git submodule update --init --depth 1 --recursive
- name: Cache testdata
id: cache-testdata
uses: actions/cache@v3
with:
path: |
tests/testdata
key: ${{ runner.os }}-testdata

- name: Update git submodules
if: steps.cache-testdata.outputs.cache-hit != 'true'
run:
git submodule update --init --depth 1 --recursive
- name: Test
run: go run build/ci.go test -dlgo

2 changes: 1 addition & 1 deletion internal/build/gotool.go
Expand Up @@ -144,7 +144,7 @@ func Version(csdb *ChecksumDB, version string) (string, error) {
continue
}
if parts[0] == version {
parts[0] = strings.Trim(parts[0], "\r")
parts[0] = strings.Trim(strings.Trim(parts[0], "\r"), "\\r")
log.Printf("Found version %q", parts[1])
return parts[1], nil
}
Expand Down

0 comments on commit 4ac5006

Please sign in to comment.