From 9ea899afa76949d2e1a2a6eabbbec14f139a7592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 10 Feb 2023 12:29:03 +0100 Subject: [PATCH] refactor(permissions): use less space for permissions prompt (#17708) --- runtime/permissions/prompter.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/permissions/prompter.rs b/runtime/permissions/prompter.rs index e311bc9785..c33483645f 100644 --- a/runtime/permissions/prompter.rs +++ b/runtime/permissions/prompter.rs @@ -199,16 +199,16 @@ impl PermissionPrompter for TtyPrompter { // print to stderr so that if stdout is piped this is still displayed. const OPTS: &str = "[y/n] (y = yes, allow; n = no, deny)"; - eprint!("{PERMISSION_EMOJI} ┌ "); + eprint!("┌ {PERMISSION_EMOJI} "); eprint!("{}", colors::bold("Deno requests ")); eprint!("{}", colors::bold(message)); eprintln!("{}", colors::bold(".")); if let Some(api_name) = api_name { - eprintln!(" ├ Requested by `{api_name}` API"); + eprintln!("├ Requested by `{api_name}` API"); } let msg = format!("Run again with --allow-{name} to bypass this prompt."); - eprintln!(" ├ {}", colors::italic(&msg)); - eprint!(" └ {}", colors::bold("Allow?")); + eprintln!("├ {}", colors::italic(&msg)); + eprint!("└ {}", colors::bold("Allow?")); eprint!(" {OPTS} > "); let value = loop { let mut input = String::new(); @@ -237,7 +237,7 @@ impl PermissionPrompter for TtyPrompter { _ => { // If we don't get a recognized option try again. clear_n_lines(1); - eprint!(" └ {}", colors::bold("Unrecognized option. Allow?")); + eprint!("└ {}", colors::bold("Unrecognized option. Allow?")); eprint!(" {OPTS} > "); } };