Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

Not executing backtick command in --proto_path #160

Description

@meling

In several of my projects I use a configuration like this (and it works fine):

"options": [
	"--proto_path=${workspaceRoot}/",
	"--proto_path=`go list -m -f {{.Dir}} github.com/relab/gorums`",
	"--go_out=proto/"
]

However, I'm trying to set up the same in an another project, but I cannot seem to get it to work. I get this error and the plugin show errors in the Problems pane:

`go list -m -f {{.Dir}} github.com/relab/gorums`: warning: directory does not exist. gorums.proto: File not found.

If I run the command go list -m -f {{.Dir}} github.com/relab/gorums in the terminal and copy the output, the errors go away and all is fine:

"options": [
	"--proto_path=${workspaceRoot}/",
	"--proto_path=/Users/meling/go/pkg/mod/github.com/relab/gorums@v0.7.1-0.20220307181651-94a8af8e467c",
	"--go_out=proto/"
]

I've also tried with the $(shell ...) thing:

"options": [
	"--proto_path=${workspaceRoot}/",
	"--proto_path=$(shell go list -m -f {{.Dir}} github.com/relab/gorums)",
	"--go_out=proto/"
]

Anyone know what could be the problem?

PS: The reason for using the command to populate the proto_path is so that I can commit the settings.json to git and allow other developers get this working out of the box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions