fix(context): guard nil local config before context switch - #406
fix(context): guard nil local config before context switch#406Rahulatram321 wants to merge 1 commit into
Conversation
|
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
|
please pass the DCO |
Signed-off-by: rahulAtram <rahulatram0226@gmail.com>
0fb7f62 to
0b50f24
Compare
Thanks for the review and for flagging this. I’ve updated this PR by rewriting the commit(s) with DCO sign-off and force-pushed the branch. Signed-off-by: Rahul Atram rahulatram0226@gmail.com I also kept the scope unchanged to only the intended fix in this PR. |
|
Hi Sir,
Thank you for pointing this out.
I have updated this PR by rewriting the commit history with DCO sign-off
and force-pushing the branch.
All commits now include:
Signed-off-by: Rahul Atram ***@***.***>
The PR scope is unchanged and remains limited to the original fix only.
Could you please recheck once the DCO status updates?
Thanks again for your guidance.
Best,
Rahul Atram
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
…On Sat, May 23, 2026 at 11:35 PM Vaishnav Kale ***@***.***> wrote:
*Vaishnav88sk* left a comment (microcks/microcks-cli#406)
<#406 (comment)>
please pass the DCO
—
Reply to this email directly, view it on GitHub
<#406 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BER7XKED5Z2DQFRPQ224A3D44HR73AVCNFSM6AAAAACZCRKFX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKMRWGE2TEOBZGY>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
|
Thanks! The context command on master now nil-guards the local config before use, so this is superseded. Appreciate the effort. Suggest closing this |
|
Thanks @Rahulatram321 and sorry we couldn't merge this erlier. As it's already tackled on master, we have to close this. |
Description
This PR fixes a crash path in the
microcks contextcommand when no local config exists yet.Problem
When running
microcks context <context-name>on a fresh machine (or after config cleanup),localCfgcan benil.The command dereferences
localCfg(localCfg.CurrentContext) without a nil guard, which can lead to a nil pointer panic instead of a user-friendly message.Changes
localCfg == nilcheck incmd/context.gobefore first dereference in the context-switch flow.microcks context(no args): still lists contexts / prints existing output path.microcks context --delete ...: unchanged.Result