Go run config gives error permission for Fleet-based dev environment from Space

Go run config gives error permission for Fleet-based dev environment from Space

Problem Description:

I am running a Fleet-based dev environment from Space (cool sentence btw). It’s a simple Go program. If I open a terminal in Fleet, I can successfully execute go run cm/server/main.go. But when creating a run config, I get a permission denied (os error 13) error.

My run.json file:

{
  "configurations": [
    {
       "type": "go",
       "name": "localhost",
       "goExecPath": "cmd/server/main.go",
       "buildParams": [],
    },

    ]
}

The error:

enter image description here

Solution – 1

Edit: the issue is your config file.

It needs to look like this:


{
  "configurations": [
    {
      "type": "go",
      "name": "findAverage",
      "goExecPath": "/usr/local/go/bin/go",
      "buildParams": [
        "$PROJECT_DIR$/main.go",
      ],
      "runParams":  ["1", "2", "3"]
    }
  ]
}

goExecPath is the path to the go executable, and you put your main.go file in buildParams.


Source

Rate this post
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Reject