File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
1212 "github.com/stackitcloud/stackit-cli/internal/pkg/flags"
1313 "github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
1414 "github.com/stackitcloud/stackit-cli/internal/pkg/print"
15+ "github.com/stackitcloud/stackit-cli/internal/pkg/projectname"
1516 "github.com/stackitcloud/stackit-cli/internal/pkg/services/alb/client"
1617 "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1718 "golang.org/x/term"
@@ -70,8 +71,13 @@ func NewCmd(p *print.Printer) *cobra.Command {
7071 if err != nil {
7172 return err
7273 }
74+ projectLabel , err := projectname .GetProjectName (ctx , p , cmd )
75+ if err != nil {
76+ p .Debug (print .ErrorLevel , "get project name: %v" , err )
77+ projectLabel = model .ProjectId
78+ }
7379 if ! model .AssumeYes {
74- prompt := fmt .Sprintf ("Are you sure you want to update credential %q?" , * model .CredentialsRef )
80+ prompt := fmt .Sprintf ("Are you sure you want to update credential %q for %q ?" , * model .CredentialsRef , projectLabel )
7581 err = p .PromptForConfirmation (prompt )
7682 if err != nil {
7783 return fmt .Errorf ("update credential: %w" , err )
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
5656 }
5757
5858 if ! model .AssumeYes {
59- prompt := fmt .Sprintf ("Are you sure you want to delete the application loadbalancer %q for project %q?" , model .Name , projectLabel )
59+ prompt := fmt .Sprintf ("Are you sure you want to delete the credentials %q for project %q?" , model .Name , projectLabel )
6060 err = p .PromptForConfirmation (prompt )
6161 if err != nil {
6262 return err
You can’t perform that action at this time.
0 commit comments