Skip to content

Access system enivronment variables cross-platform? #808

Answered by keith-miller
keith-miller asked this question in Q&A
Discussion options

You must be logged in to vote

Duh, I needed quoted for the back slashes in the path lol

generate-protos:
    deps:
      - create-models-dir
    cmds:
      - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
      - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
      - |
        protoc --plugin=protoc-gen-go="{{.GOPATH}}{{fromSlash "/bin/protoc-gen-go"}}{{exeExt}}" \
        --proto_path=protos \
        --go_out=models \
        --go_opt=paths=source_relative
       ...

Works on MacOS and Windows now.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by andreynering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant