Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-delete --no-interactive still ask for confirmation #6360

Open
nicoovh opened this issue Nov 9, 2022 · 1 comment
Open

run-delete --no-interactive still ask for confirmation #6360

nicoovh opened this issue Nov 9, 2022 · 1 comment

Comments

@nicoovh
Copy link

nicoovh commented Nov 9, 2022

When I launch:

cdsctl workflow run-delete -n PROJECT my-workflow-name 315
# or 
cdsctl workflow run-delete --no-interactive PROJECT my-workflow-name 315

it asks for confirmation

? Are you sure to delete? (Y/n)

Version:

❯ cdsctl version
cdsctl:
  version: 0.52.0
  architecture: arm64
  os: darwin
  git_hash: 1da97b5e45e1630f2da5b07c3e1789dd6d939e8d
  build_time: 09/26/22-14:58:49
  keychain: false
api:
  version: 0.52.0-42-g20c5156.18205
  architecture: amd64
  os: linux
  git_hash: 20c51569bd1ffeae6f672a8941874cf4ee3a2e0c
  build_time: 11/08/22-10:10:46
  db_migrate: "0"
@nicoovh
Copy link
Author

nicoovh commented Nov 9, 2022

In the help/documentation, the option to be non interactive is --no-interactive
In the code, the option is --force

		case RunDeleteFunc:
			if f == nil {
				cmd.Help() // nolint
				OSExit(0)
			}

			force, _ := cmd.Flags().GetBool("force")

			if !force && !AskConfirm("Are you sure to delete?") {
				fmt.Println("Deletion aborted")
				OSExit(0)
			}

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

No branches or pull requests

1 participant