question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"File exists" errors when un-taring golangci-lint

See original GitHub issue

Follow-up to https://github.com/golangci/golangci-lint-action/issues/135, https://github.com/golangci/golangci-lint-action/pull/156 and #221.

Using v2, I’m still seeing these errors:

- name: Lint
  uses: golangci/golangci-lint-action@v2
  with:
    version: v1.37

Example is in https://github.com/andig/evcc/pull/1075/checks?check_run_id=2655591730

Apart from fixing using tar- why not just use go install instead?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:9
  • Comments:37 (14 by maintainers)

github_iconTop GitHub Comments

4reactions
apuzyrevskycommented, Jun 29, 2022

This pops up (again?) in v3

      - name: Install Go
        uses: actions/setup-go@v3
        with:
          go-version: '1.18'
          cache: true

      - name: Build
        run: go build ./...

      - name: Lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.46.2
  Error: /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/text@v0.3.7/message/catalog_test.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/text@v0.3.7/README.md: Cannot open: File exists
  /usr/bin/tar: Exiting with failure status due to previous errors
  Warning: Tar failed with error: The process '/usr/bin/tar' failed with exit code 2

Can confirm, I’ve got the same issue: Error: /usr/bin/tar: ../../../../home/runner/go/pkg/mod/github.com/google/renameio@v1.0.1/doc.go: Cannot open: File exists Error: /usr/bin/tar: ../../../../home/runner/go/pkg/mod/github.com/google/renameio@v1.0.1/example_test.go: Cannot open: File exists

3reactions
drissamricommented, Jun 21, 2022

This pops up (again?) in v3

      - name: Install Go
        uses: actions/setup-go@v3
        with:
          go-version: '1.18'
          cache: true

      - name: Build
        run: go build ./...

      - name: Lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.46.2
  Error: /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/text@v0.3.7/message/catalog_test.go: Cannot open: File exists
  /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/text@v0.3.7/README.md: Cannot open: File exists
  /usr/bin/tar: Exiting with failure status due to previous errors
  Warning: Tar failed with error: The process '/usr/bin/tar' failed with exit code 2
Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub action for golangci-lint fails with can't load fmt
If I run it with go 1.18, it works fine. With go 1.19, it fails with the same error as given here. Share....
Read more >
Linters | golangci-lint
Name Description Presets Since asasalint ⚙️ check for pass any as any in variadic func(...any) bugs 1.47.0 bidichk ⚙️ Checks for dangerous unicode character sequences...
Read more >
A Complete Guide to Linting Go Programs - freshman.tech
golangci -lint run may spot some problems with the default ... This file will be used if a locally scoped config file does...
Read more >
Release history - chezmoi
817d3e7f feat: Stop building snaps · ab6bc8d9 feat: Make add command add empty files, remove --empty flag · 755e02f4 fix: Don't return an...
Read more >
fast & configurable linter for Go - revive
golangci -lint configuration file linters: enable: - revive. Then revive can be configured by adding an entry to the linters-settings section of the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found