internal/build: fix build on latest windows

This commit is contained in:
Marius van der Wijden 2023-11-24 14:04:07 +01:00
parent 5fa8c793ad
commit 4ac50067c9
2 changed files with 17 additions and 5 deletions

View file

@ -34,13 +34,25 @@ jobs:
needs: lint needs: lint
steps: steps:
- uses: actions/checkout@v2 steps:
- uses: actions/checkout@v3
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: 1.20.5 go-version: 1.20.5
- name: Install Submodules - name: Cache testdata
run: git submodule update --init --depth 1 --recursive 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 - name: Test
run: go run build/ci.go test -dlgo run: go run build/ci.go test -dlgo

View file

@ -144,7 +144,7 @@ func Version(csdb *ChecksumDB, version string) (string, error) {
continue continue
} }
if parts[0] == version { 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]) log.Printf("Found version %q", parts[1])
return parts[1], nil return parts[1], nil
} }