Expand relative basedir

This commit is contained in:
southerntofu 2020-11-25 21:58:00 +01:00
parent f86e3f6905
commit 5bee567e34
1 changed files with 1 additions and 1 deletions

View File

@ -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");