summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2021-05-27 15:30:14 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2021-05-27 15:30:14 +0530
commitcb3072066dc482cbadfbd77c64b7e61a1b24b9c6 (patch)
tree4d16baf85a519670ca8647b0b11abb1c54fc0bad /src/main.rs
parent1e5c688ed99fe7f96e5e690fba70d80782a53d3d (diff)
hotfix(publish): Move install module and asset_map to main zellij package. publish should hopefully work now.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 67b833988..efb991567 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,7 +1,9 @@
+mod install;
mod sessions;
#[cfg(test)]
mod tests;
+use crate::install::populate_data_dir;
use sessions::{assert_session, assert_session_ne, list_sessions};
use std::convert::TryFrom;
use std::process;
@@ -12,7 +14,7 @@ use zellij_utils::{
consts::{ZELLIJ_TMP_DIR, ZELLIJ_TMP_LOG_DIR},
input::config::Config,
logging::*,
- setup::Setup,
+ setup::{get_default_data_dir, Setup},
structopt::StructOpt,
};
@@ -69,6 +71,12 @@ pub fn main() {
.clone()
.unwrap_or_else(|| names::Generator::default().next().unwrap());
assert_session_ne(&session_name);
+ // Determine and initialize the data directory
+ let data_dir = opts.data_dir.clone().unwrap_or_else(get_default_data_dir);
+
+ #[cfg(not(disable_automatic_asset_installation))]
+ populate_data_dir(&data_dir);
+
start_client(
Box::new(os_input),
opts,