fix(terminal): resolve terminal symlink once
This commit is contained in:
parent
0c7f3631d3
commit
6cdf2987a9
1 changed files with 2 additions and 4 deletions
|
|
@ -116,10 +116,8 @@ fn detect_terminal() -> (PathBuf, &'static str) {
|
|||
const SYMLINK: &str = "/usr/bin/x-terminal-emulator";
|
||||
|
||||
if let Ok(found) = read_link(SYMLINK) {
|
||||
if let Ok(found) = read_link(&found) {
|
||||
return (found, "-e");
|
||||
}
|
||||
return (read_link(&found).unwrap_or(found), "-e");
|
||||
}
|
||||
|
||||
(PathBuf::from("/usr/bin/gnome-terminal"), "--")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue