aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorEllie Huxtable <e@elm.sh>2021-02-13 20:54:35 +0000
committerEllie Huxtable <e@elm.sh>2021-02-13 20:55:06 +0000
commitfbaeedbba441a89be7778be5cffa89a421007d17 (patch)
tree125bb90ef0452005d4c5690e1d9f3bddb34025cb /src/main.rs
parentAdd session to hook (diff)
downloadatuin-fbaeedbba441a89be7778be5cffa89a421007d17.zip
Minor fixes
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 22c8b21d..86540a97 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,4 @@
+use std::env;
use std::path::PathBuf;
use directories::ProjectDirs;
@@ -84,5 +85,11 @@ impl Atuin {
fn main() -> Result<()> {
pretty_env_logger::init();
+ let session = env::var("ATUIN_SESSION");
+
+ if session.is_err() {
+ panic!("Please follow the atuin setup! Missing session.")
+ }
+
Atuin::from_args().run()
}