Handle duplicate stack names across endpoints in console command
When a stack name exists on multiple endpoints, error with a list showing each match with its endpoint ID and name. Pass --endpoint ID to disambiguate. Single matches continue to work without any extra flags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
ed5eca8924
commit
e002cdf170
2 files changed
+38
-10
No files matched your search
@@ -31,6 +31,7 @@ module PortainerCli
|
||||
portainer-cli create stack --endpoint ID --name NAME --file FILE
|
||||
portainer-cli create container --endpoint ID --image IMAGE [--name NAME] [--port h:c] [--env K=V]
|
||||
portainer-cli console <stack> [container] Open interactive shell (resolves endpoint automatically)
|
||||
--endpoint ID Disambiguate when stack name exists on multiple endpoints
|
||||
--shell SHELL Shell to use (default: /bin/sh)
|
||||
--run CMD Run command instead of a bare shell
|
||||
portainer-cli exec <endpoint-id> <container> Open interactive shell (manual endpoint)
|
||||
|
||||