Skip to content

Conversation

GusAntoniassi
Copy link

Hello, I wasn't able to use this action because the golangci-lint tool apparently wasn't being in the PATH.

I have done some debugging, ran some ls -lah inside the job, and compared with the actions/setup-go installer, and found out the tool was being extracted in a golangci-lint-${version}-linux-amd64 directory.

I have added the following code to add the correct directory to PATH:

  // Tool will be extracted in a directory with the compressed file name
  toolRoot = path.join(toolPath, `golangci-lint-${version}-linux-amd64`)

  // Add golangci-lint dir to bin
  core.addPath(toolRoot);

I have also added some extra things like a which and a golangci-lint --version command to validate the tool instalation, and some usage documentation in the README.md.

Any feedback is much appreciated.

@GusAntoniassi
Copy link
Author

Fixes #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant