Skip to content

fix: add --name flag to stop command and remove empty println#439

Closed
A-d-i-t-y wants to merge 1 commit into
microcks:masterfrom
A-d-i-t-y:fix/stop-command-add-name-flag
Closed

fix: add --name flag to stop command and remove empty println#439
A-d-i-t-y wants to merge 1 commit into
microcks:masterfrom
A-d-i-t-y:fix/stop-command-add-name-flag

Conversation

@A-d-i-t-y

Copy link
Copy Markdown

Summary

Adds --name flag to stop command for consistency with start command.

Problem

The start command supports --name flag to name a Microcks instance
but the stop command has no --name flag:

microcks start --name myinstance ✅ works
microcks stop --name myinstance ❌ flag did not exist

Users could not specify which instance to stop when multiple
instances exist. The stop command always resolved the current
context instead.

Fix

  • Added --name flag to stop command
  • Pass name to ResolveContext() so correct instance is stopped
  • Removed unnecessary empty fmt.Println() call

Files Changed

  • cmd/stop.go — added --name flag, removed empty println

Closes #438

- Added --name flag to stop command so users can specify which
  Microcks instance to stop, consistent with start command
- Removed unnecessary empty fmt.Println() call

Closes microcks#438

Signed-off-by: Aditya <aaaditya1909@gmail.com>
@A-d-i-t-y

Copy link
Copy Markdown
Author

Hi @Harsh4902 @Vaishnav88sk, I have raised this PR to add --name flag to the stop command. Currently start command supports --name flag but stop command did not, making it inconsistent. This fix allows users to specify which Microcks instance to stop by name. Would love your feedback!

@Vaishnav88sk

Copy link
Copy Markdown

Please check #307

It may cause conflict.

@A-d-i-t-y

Copy link
Copy Markdown
Author

Hi @Vaishnav88sk, thank you for checking! I can see PR #307 already covers significant improvements to the stop command. Closing this PR to avoid conflicts. Sorry for the noise!

@A-d-i-t-y A-d-i-t-y closed this May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: stop command missing --name flag to specify which instance to stop

2 participants