GetStream / vg

Virtualgo: Easy and powerful workspace based development for go
MIT License
1.32k stars 45 forks source link

Override virtualgoroot (~/.virtualgo)? #17

Closed glasser closed 6 years ago

glasser commented 6 years ago

We have a project that uses a variety of home-grown shell scripts to provide a similar experience to vg. I'd like to replace it with vg.

One nice feature of our project is that you can check it out anywhere and it will work immediately (as long as you run our shell wrapper, which works well with direnv). We store the equivalent to the ~/.virtualgo/V directory inside a gitignored directory in the repo itself. That way you can have multiple checkouts and they just work.

So to port to vg our scripts (we'd still have direnv scripts because we set up non-Go environments as well) would like to be able to just use a fixed environment name and a virtualgoroot that's not global, rather than a global virtualgoroot and a variable environment name.

It looks like we should be able to just define, say, $VIRTUALGOROOT, and use it instead of ~/.virtualgo in the shell scripts and utils.Virtualgoroot. Is that a PR you'd take?

JelteF commented 6 years ago

If you can create a PR I'll gladly merge it. Be sure that it still defaults to ~/.virtualgo though if not set.