Skip to content

Commit

Permalink
Update all shell messages with valid inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsbhat committed Jan 13, 2024
1 parent 4dba812 commit 62ad13a
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cmd/agent_profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func deleteAgentProfileCommand() *cobra.Command {
PreRunE: setCLIClient,
RunE: func(cmd *cobra.Command, args []string) error {
profileName := args[0]
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete elastic-agent-profile '%s'", profileName)
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete elastic-agent-profile '%s' [y/n]", profileName)

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ gocd-cli agents delete --id 938d1935-bdca-4728-83d5-e96cbf0a4f8b`,
}
}

cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete agent '%s'", agentID)
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete agent '%s' [y/n]", agentID)

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func deleteArtifactStoreCommand() *cobra.Command {
PreRunE: setCLIClient,
RunE: func(cmd *cobra.Command, args []string) error {
storeName := args[0]
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete store '%s'", storeName)
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete store '%s' [y/n]", storeName)

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func deleteBackupConfig() *cobra.Command {
Args: cobra.NoArgs,
PreRunE: setCLIClient,
RunE: func(cmd *cobra.Command, args []string) error {
cliShellReadConfig.ShellMessage = "do you want to delete GoCD's backup configuration"
cliShellReadConfig.ShellMessage = "do you want to delete GoCD's backup configuration [y/n]"

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/cluster_profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func deleteClusterProfileCommand() *cobra.Command {
PreRunE: setCLIClient,
RunE: func(cmd *cobra.Command, args []string) error {
clusterProfile := args[0]
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete cluster profile '%s'", clusterProfile)
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete cluster profile '%s' [y/n]", clusterProfile)

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/config_repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func getDeleteConfigRepoCommand() *cobra.Command {
PreRunE: setCLIClient,
RunE: func(cmd *cobra.Command, args []string) error {
configRepoName := args[0]
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete config repo '%s'", configRepoName)
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete config repo '%s' [y/n]", configRepoName)

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/environments.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func deleteEnvironmentCommand() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
environmentName := args[0]

cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete gocd environment '%s'", environmentName)
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete gocd environment '%s' [y/n]", environmentName)

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/pipeline_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func deletePipelineGroupCommand() *cobra.Command {
Example: `gocd-cli pipeline-group delete movies`,
RunE: func(cmd *cobra.Command, args []string) error {
pipelineGroupName := args[0]
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete pipeline-group '%s'", pipelineGroupName)
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete pipeline-group '%s' [y/n]", pipelineGroupName)

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ func deletePipelineCommand() *cobra.Command {
Example: `gocd-cli pipeline delete movies`,
RunE: func(cmd *cobra.Command, args []string) error {
pipelineName := args[0]
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete pipeline '%s'", pipelineName)
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete pipeline '%s' [y/n]", pipelineName)

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/server_configurations.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func deleteMailServerConfigCommand() *cobra.Command {
Args: cobra.NoArgs,
PreRunE: setCLIClient,
RunE: func(cmd *cobra.Command, args []string) error {
cliShellReadConfig.ShellMessage = "do you want to delete GoCD's mail server config"
cliShellReadConfig.ShellMessage = "do you want to delete GoCD's mail server config [y/n]"

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down
2 changes: 1 addition & 1 deletion cmd/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func userDeleteCommand() *cobra.Command {
PreRunE: setCLIClient,
RunE: func(cmd *cobra.Command, args []string) error {
userName := args[0]
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete user '%s'", userName)
cliShellReadConfig.ShellMessage = fmt.Sprintf("do you want to delete user '%s' [y/n]", userName)

if !cliCfg.Yes {
contains, option := cliShellReadConfig.Reader()
Expand Down

0 comments on commit 62ad13a

Please sign in to comment.