report: grow the Prompter port and move display_path out of the ui module
Prompter gains interactive(), select() and text() (with the Validator type), and confirm() now propagates cancellation as Err so flows abort instead of silently taking a default when the user hits Ctrl+C. The terminal prompter implements the full port; the port also re-exports the path display helper, which is pure presentation formatting used by events and messages rather than terminal code.
This commit is contained in:
+7
-4
@@ -170,10 +170,13 @@ fn retry_after_revendor(
|
||||
original: Box<dyn Error>,
|
||||
) -> Result<SourceBuildOutput, Box<dyn Error>> {
|
||||
log::error!("{original}");
|
||||
if !prompter.confirm(
|
||||
"Re-vendor the Cargo dependencies and retry the build?",
|
||||
false,
|
||||
) {
|
||||
if !prompter
|
||||
.confirm(
|
||||
"Re-vendor the Cargo dependencies and retry the build?",
|
||||
false,
|
||||
)
|
||||
.unwrap_or(false)
|
||||
{
|
||||
view.finish_failure();
|
||||
return Err(original);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user