fix(crash): ensure ZELLIJ_TMP_DIR exists when starting plugins (#1256)
This commit is contained in:
parent
e7447fe88f
commit
c4d62f8f61
1 changed files with 9 additions and 0 deletions
|
|
@ -264,6 +264,15 @@ fn start_plugin(
|
|||
)
|
||||
});
|
||||
|
||||
// ensure tmp dir exists, in case it somehow was deleted (e.g systemd-tmpfiles)
|
||||
fs::create_dir_all(ZELLIJ_TMP_DIR.as_path()).unwrap_or_else(|e| {
|
||||
log::error!(
|
||||
"Could not create ZELLIJ_TMP_DIR at {:?} \n Error: {:?}",
|
||||
&ZELLIJ_TMP_DIR.as_path(),
|
||||
e
|
||||
)
|
||||
});
|
||||
|
||||
let mut wasi_env = WasiState::new("Zellij")
|
||||
.env("CLICOLOR_FORCE", "1")
|
||||
.map_dir("/host", ".")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue