-
Notifications
You must be signed in to change notification settings - Fork 148
gb env should return value associated with a variable #476
Comments
👍 from me. You'll probably have to do some serious surgery to replace the simplistic way Alternatively you may want to add a Either way, please make sure you add end to end tests to cmd/gb/gb_test.go. Thanks Dave |
Awesome! Will get rolling. |
I see what you meant by "serious surgery", the args are pkg paths :) Then I discovered cmd.ParseArgs |
`gb info` optionally accepts a list of environment variable names and returns their values. `gb env` is aliased to gb info. Updates constabulary#476
I believe there is an option to override arg parsing per command. Have a On Wed, 9 Dec 2015, 08:50 Greg Osuri notifications@github.com wrote:
|
Thanks.. Figured it out |
Sorry its such a hand rolled mess. Part of the challenge with gb is I've made such a song and dance about how I should probably find a ladder and get down off my high horse. On Wed, 9 Dec 2015, 10:23 Greg Osuri notifications@github.com wrote:
|
I sort of jumped straight to the command's code under the assumption that args weren't manipulated. It wasn't hard tracing back. The code and tests were clear and easy to understand. More over, I learned much more about the tool with this exercise. Will come handy since I'll be using gb everyday. |
closed by #477 |
A cool enhancement that'll make
gb env
more script friendly would be to return the assigned value for a var, similar togo env VAR
. Example:I can send a patch, if you'd like.
The text was updated successfully, but these errors were encountered: