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.

Binaries installed via `go install` are not accessible on path

See original GitHub issue

Hi,

I’m hoping to migrate my open source library from Travis to Github Actions, but I’ve hit a snag - I’m unable to run most of my build checks. I use golint and goimports, both tools installed via go install.

These binaries are not found on any OS that I’ve tried, (windows, ubuntu, macOS) which led me to this repo where I discovered that GOBIN was not being added to PATH.

The fix should be as simple as adding GOPATH/bin to PATH

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

20reactions
kjkcommented, Nov 3, 2019

I agree this should work by default but for now you can add to each step:

export PATH=${PATH}:`go env GOPATH`/bin

See https://presstige.io/p/Using-GitHub-Actions-with-Go-2ca9744b531f4f21bdae9976d1ccbb58#e86c1c15-6f43-4f43-935f-37895bd14208 for a fuller example (I use that for running staticcheck)

(just a tip, I’m not the maintainer).

2reactions
bryanmacfarlanecommented, Feb 7, 2020

actually after further investigation it looks like the env and path are already getting set, but to the wrong values.

Agreed. Will fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to properly install GO with paths and all? - Stack Overflow
2 Answers 2 · Install Go with the installer (Windows) or archive (extract into /usr/local on Linux/Mac). · When installing from archive, manually ......
Read more >
1. Setting Up Your Go Environment - Learning Go [Book]
Go programs compile to a single binary and do not require any additional software to be installed in order to run them. Install...
Read more >
go command - cmd/go - Go Packages
Install compiles and installs the packages named by the import paths. Executables are installed in the directory named by the GOBIN environment variable,...
Read more >
Install Docker Engine from binaries
This page contains information on how to install Docker using binaries. These instructions are mostly suitable for testing purposes. We do not recommend ......
Read more >
Installing pandoc
This will install pandoc, replacing older versions, and update your path to include the directory where pandoc's binaries are installed. If you prefer...
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