Honor global flags in all DevPod CLI sub-commands#161
Honor global flags in all DevPod CLI sub-commands#161skevetter merged 2 commits intoskevetter:mainfrom
Conversation
c2c1c6b to
b4f02d9
Compare
|
Thanks for submitting this. Would you add the missing contexts when loading the config and tests? Reference my supplemental commits in #162 |
My pleasure!
I think that when creating/manipulating/using a context, with the context to be operated on supplied as a command line parameter, Tests are amazing! Thank you so much for adding them!! Yes on 9f1f04e. |
Note: #162 is missing a change https://github.com/skevetter/devpod/pull/161/files#diff-d4945abb538db295c4697ad1aecc02ae2c8a6a10ef40f8b5e727081870307f71L22 (see explanation in the updated #161 description). |
09ace65 to
26cda45
Compare
26cda45 to
13514a1
Compare
|
Looks good. Would you add the integration test file? |
|
Leonid Dubinsky
On Fri, Dec 26, 2025, 12:57 Samuel K ***@***.***> wrote:
Looks good. Would you add the integration test file?
I am embarrassed to admit that I do not know how to add your commit to my
branch while retaining correct attribution and signature...
Could you possibly do it?
Thanks!
… |
Don't worry about attribution/signature. To keep it simple, create the files on your development branch, commit the changes, and then push here. |
|
Don't worry about attribution/signature. To keep it simple, create the
files on your development branch, commit the changes, and then push here.
Ok then. I plan to do it on Sunday. Thanks!
… |
13514a1 to
7825ef2
Compare
|
@skevetter - it is done |
7825ef2 to
a5c5ba5
Compare
Currently, some of the DevPod CLI sub-commands do not honor global flags `--context` and `--provider`. For instance: ```shell $ devpod context create box $ devpod ide use intellij --context default ``` sets the default ide on the 'box' context and not on the 'default' context, as can be verified with ```shell $ devpod ide list $ devpod context use default $ devpod ide list ``` which is wrong ;) The fix seems to be to move a '*' from the structure creation to the structure declaration, the way most of the sub-commands do it. I have only a vague idea of what this all means, this being the first Go code I ever touched, but it does bring up C(++) memories from the last millennium... I applied this adjustment to all the 13 commands that seem to have misplaced that crucial '*': - context create/delete/list/set-options/use - ide list/options/set-options/use - provider list/list-available/set-options/use It is not clear to me how this was not detected earlier ;) Please review! Signed-off-by: Leonid Dubinsky <dub@podval.org>
Signed-off-by: Leonid Dubinsky <dub@podval.org>
a5c5ba5 to
ffc293d
Compare
|
Thanks! |
Currently, some of the DevPod CLI sub-commands do not honor global flags
--contextand--provider.For instance:
sets the default ide on the 'box' context and not on the 'default' context, as can be verified with
which is wrong ;)
The fix seems to be to move a '*' from the structure creation to the structure declaration, the way most of the sub-commands do it.
I have only a vague idea of what this all means, this being the first Go code I ever touched, but it does bring up C(++) memories from the last millennium...
I applied this adjustment to all the 13 commands that seem to have misplaced that crucial '*':
It is not clear to me how this was not detected earlier ;)
Please review!