From 18c75f0e4265d4942a93dd67f7cbd34e79281be8 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 10 May 2021 07:11:34 -0400 Subject: Switch grant/deny prompt to yes/no (#10547) --- runtime/permissions.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/permissions.rs b/runtime/permissions.rs index 3bdfd16bb..d98bcc71a 100644 --- a/runtime/permissions.rs +++ b/runtime/permissions.rs @@ -1054,9 +1054,9 @@ fn permission_prompt(message: &str) -> bool { if !atty::is(atty::Stream::Stdin) || !atty::is(atty::Stream::Stderr) { return false; }; - let opts = "[g/d (g = grant, d = deny)] "; + let opts = "[y/n (y = yes allow, n = no deny)] "; let msg = format!( - "{} ️Deno requests {}. Grant? {}", + "{} ️Deno requests {}. Allow? {}", PERMISSION_EMOJI, message, opts ); // print to stderr so that if deno is > to a file this is still displayed. @@ -1073,8 +1073,8 @@ fn permission_prompt(message: &str) -> bool { Some(v) => v, }; match ch.to_ascii_lowercase() { - 'g' => return true, - 'd' => return false, + 'y' => return true, + 'n' => return false, _ => { // If we don't get a recognized option try again. let msg_again = format!("Unrecognized option '{}' {}", ch, opts); -- cgit v1.2.3