I am attempting to play around with https://github.com/uber/prototool that i came across. I created a simple repo called protobufs
and wrote a simple script to generate my proto files in a docker container that pulls the image uber-prototool.
Code in
generate.sh` file:
#!/bin/bash
rm -rf gen
echo Generating Go code for all repos...
docker run --rm -v "$(pwd):/work" "uber/prototool:1.8.0" prototool generate proto
and also have a prototool.yaml file that looks like
excludes:
- node_modules
protoc:
version: 3.8.0
lint:
group: uber2
file_header:
content: |
//
//
//
is_commented: true
generate:
plugins:
- name: go
output: ../gen/go
flags: plugins=grpc
I successfully generate the proto files but i get a Permission Denied
when attempting to cd
into the generated folder called gen
. It's a hidden file and only can have access when i use sudo
. It fails to show the hidden folder in vscode
as well. I don't want to have to sudo into the hidden folder all the time and rather want a non root user to have access. How can i solve this?
Here is a screenshot of the repo being generated as a root user: