From 5bee567e3451f4f3c82c7346c7cc2ba020d0a3b9 Mon Sep 17 00:00:00 2001 From: southerntofu Date: Wed, 25 Nov 2020 21:58:00 +0100 Subject: [PATCH] Expand relative basedir --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 6ba5502..0cff35a 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -19,7 +19,7 @@ pub struct Cli { impl Cli { pub fn basedir(&self) -> PathBuf { if let Some(basedir) = &self.basedir { - PathBuf::from(basedir) + PathBuf::from(basedir).canonicalize().expect("failed to expand relative path") } else { let mut home_path = PathBuf::from(env::var("HOME").expect("No $HOME in env")); home_path.push(".forgebuild");