From 70b01bcb5d08879addfe6850d5b35aba69e76275 Mon Sep 17 00:00:00 2001 From: Josh Lee Date: Fri, 28 Apr 2017 10:40:29 -0400 Subject: [PATCH] Add sensible-browser to the browser list Users on Debian-based systems who are running without a GUI might still have a text based web browser such as w3m or lynx. Debian gives us the sensible-browser command to launch one of these (either by environment variable or with the alternatives system). xdg-open still comes first, since GUI users will be less inclined to configure the sensible utils. --- src/rustup-utils/src/raw.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rustup-utils/src/raw.rs b/src/rustup-utils/src/raw.rs index 5c91abb221..20b12c350b 100644 --- a/src/rustup-utils/src/raw.rs +++ b/src/rustup-utils/src/raw.rs @@ -367,7 +367,7 @@ pub fn find_cmd<'a>(cmds: &[&'a str]) -> Option<&'a str> { pub fn open_browser(path: &Path) -> io::Result { #[cfg(not(windows))] fn inner(path: &Path) -> io::Result { - let commands = ["xdg-open", "open", "firefox", "chromium"]; + let commands = ["xdg-open", "open", "firefox", "chromium", "sensible-browser"]; if let Some(cmd) = find_cmd(&commands) { Command::new(cmd) .arg(path)