switched session enforce to new tmux detection helper
This commit is contained in:
parent
21eda33624
commit
28a7fc44f9
1 changed files with 1 additions and 4 deletions
|
@ -35,10 +35,7 @@ pub fn prevent_nest() {
|
|||
|
||||
/// enforce a command is being used in-session
|
||||
pub fn session_enforce(cmd: &'static str) {
|
||||
let tmux = var("TMUX").unwrap_or("".to_string());
|
||||
if tmux.is_empty() {
|
||||
error::not_in_session(cmd);
|
||||
}
|
||||
if !env::tmux() { error::not_in_session(cmd); }
|
||||
}
|
||||
|
||||
/// check whether a target session exists
|
||||
|
|
Loading…
Reference in a new issue