1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

fix(runtime): refresh perm prompt 3 lines instead of 4 (#16049)

This commit is contained in:
Yoshiya Hinosawa 2022-09-27 18:07:49 +09:00 committed by GitHub
parent 4ad48d5dab
commit f3dd13730c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2104,13 +2104,13 @@ fn permission_prompt(message: &str, name: &str) -> bool {
}; };
match ch.to_ascii_lowercase() { match ch.to_ascii_lowercase() {
'y' => { 'y' => {
clear_n_lines(4); clear_n_lines(3);
let msg = format!("Granted {}.", message); let msg = format!("Granted {}.", message);
eprintln!("{}", colors::bold(&msg)); eprintln!("{}", colors::bold(&msg));
return true; return true;
} }
'n' => { 'n' => {
clear_n_lines(4); clear_n_lines(3);
let msg = format!("Denied {}.", message); let msg = format!("Denied {}.", message);
eprintln!("{}", colors::bold(&msg)); eprintln!("{}", colors::bold(&msg));
return false; return false;