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

Function confirm_in_terminal

atomic-cli/src/commands/view/split.rs:94–102  ·  view source on GitHub ↗
(prompt: &str)

Source from the content-addressed store, hash-verified

92}
93
94fn confirm_in_terminal(prompt: &str) -> CliResult<bool> {
95 dialoguer::Confirm::new()
96 .with_prompt(prompt)
97 .default(false)
98 .interact()
99 .map_err(|_| CliError::InvalidArgument {
100 message: "Splitting changes requires confirmation. Re-run with --confirm to acknowledge the risks and proceed non-interactively.".to_string(),
101 })
102}
103
104impl Command for Split {
105 fn run(&self) -> CliResult<()> {

Callers

nothing calls this directly

Calls 2

with_promptMethod · 0.80
defaultMethod · 0.45

Tested by

no test coverage detected