From f86e3f69051921b642d87afb5b8362f1c1324867 Mon Sep 17 00:00:00 2001 From: southerntofu Date: Wed, 25 Nov 2020 18:49:02 +0100 Subject: [PATCH] Setup environment vars for tasks --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index cc9410e..eb22638 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,6 +13,8 @@ fn main() -> Result<(), std::io::Error> { let cmd = cli::Cli::from_args(); let base_dir: String = cmd.basedir().to_str().unwrap().into(); + std::env::set_var("GITBUILDDIR", &base_dir); + let tasks = if cmd.tasks.is_empty() { task::from_dir(&base_dir).expect("Could not load DB") } else { @@ -20,6 +22,8 @@ fn main() -> Result<(), std::io::Error> { }; let (config_folder, ignored_tasks) = task::config(&std::path::Path::new(&base_dir)); + + std::env::set_var("GITBUILDCONF", &config_folder); for (task_name, task) in tasks.iter() { if ignored_tasks.contains(&task_name) {