mirror of
https://github.com/harivansh-afk/deskctl.git
synced 2026-04-15 04:03:28 +00:00
fix validation tests
This commit is contained in:
parent
2b435418e8
commit
9cd07bc22a
1 changed files with 2 additions and 6 deletions
|
|
@ -27,13 +27,9 @@ pub struct SessionEnvGuard {
|
|||
|
||||
impl SessionEnvGuard {
|
||||
pub fn prepare() -> Option<Self> {
|
||||
if std::env::var("DISPLAY")
|
||||
let _display = std::env::var("DISPLAY")
|
||||
.ok()
|
||||
.filter(|value| !value.is_empty())
|
||||
.is_none()
|
||||
{
|
||||
return None;
|
||||
}
|
||||
.filter(|value| !value.is_empty())?;
|
||||
|
||||
let old_session_type = std::env::var("XDG_SESSION_TYPE").ok();
|
||||
std::env::set_var("XDG_SESSION_TYPE", "x11");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue