MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / confirm_in_terminal

Function confirm_in_terminal

atomic-cli/src/commands/view/delete.rs:109–117  ·  view source on GitHub ↗
(prompt: &str)

Source from the content-addressed store, hash-verified

107}
108
109fn confirm_in_terminal(prompt: &str) -> CliResult<bool> {
110 dialoguer::Confirm::new()
111 .with_prompt(prompt)
112 .default(false)
113 .interact()
114 .map_err(|_| CliError::InvalidArgument {
115 message: "Deleting this view would orphan changes and requires confirmation. Re-run with --force to acknowledge the risks and proceed non-interactively.".to_string(),
116 })
117}
118
119impl Command for Delete {
120 fn run(&self) -> CliResult<()> {

Callers

nothing calls this directly

Calls 2

with_promptMethod · 0.80
defaultMethod · 0.45

Tested by

no test coverage detected