mercredi 13 mai 2020

running go test with sudo failed `sudo: go: command not found`

I am trying to build my golang cli project with TravisCI. One of the problem found is when running test which create files, I got permission error. But when trying to run the test with sudo, it changed to sudo: go: command not found

Here is the error snippet from travis:

enter image description here

Anyone can help with a solution?

Notes:

  1. I dont want to change my test to use sudo in the code, because later when it is used the user should decide by himself whether to use sudo or not

Aucun commentaire:

Enregistrer un commentaire