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:
grzlusandClaude Sonnet 4.6 committed 2026-03-22 15:46:34 +01:00
1 parent ed5eca8924
commit e002cdf170
2 files changed
+38 -10

No files matched your search

+1
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.