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:
+1
-1
@@ -251,7 +251,7 @@ fn print_success(opts: &NewOptions, outcome: &ScaffoldOutcome) {
|
||||
// `display_path` yields an empty string when the target is the cwd
|
||||
// itself (Here mode): `Created .` would be cryptic, so spell the
|
||||
// location out; the skeleton/path modes keep the `<dir>` display.
|
||||
let display = crate::ui::display_path(&target);
|
||||
let display = crate::report::display_path(&target);
|
||||
let location = if display.is_empty() {
|
||||
"package in the current directory".to_string()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user