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.

I configured go-version 1.15 and everything works properly without sudo. once I put the sudo then the Go available version with supper user is 1.14.x. any workaround to have Go 1.15 for supper user?

  runs-on: ubuntu-20.04
  steps:
     - name: Set up Golang
        uses: actions/setup-go@v2
        with:
          go-version: ^1.15
     - name: Check out code
        uses: actions/checkout@v2
     - name: Test
        run: sudo go test ./... -timeout 5m

you can see what happened here

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

3reactions
thediveocommented, Nov 8, 2021

If you just want to run the test binaries as root, then you can use the -exec option on go test (I’ve actually already used this in some, but not all of my projects needing sudo test execution):

go test -exec sudo ./...
2reactions
mehrdadradcommented, Nov 16, 2021

Already I can not test but I think another workaround is:

- name: Test
   run: go test -exec sudo ./...
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to troubleshoot sudo not working? (4281429)
Technical Support will need the following information to troubleshooting sudo issues: 1 - ldd `which sudo` To check if sudo is compiled with ......
Read more >
Troubleshooting Sudo
Troubleshooting Sudo. Creative Commons License ... If you don't want to bother editing the /etc/group file, you can also issue this command:.
Read more >
security issue of Linux sudo command? - Server Fault
I am using a Red Hat Enterprise 5 Linux box. I find if a user is in /etc/sudoers file, then if the user...
Read more >
A.2. Troubleshooting sudo with SSSD and sudo Debugging ...
SSSD and sudo Debug Logging ... Debug sudo /var/log/sudo_debug.log all@debug Debug sudoers.so ... Run the sudo command as the user you want to...
Read more >
The Problem with Sudo - CyberArk
A large company's sudoers file is likely to be lengthy, convoluted and very old. On average, there are 16,500 lines of code and...
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