Expand relative basedir
This commit is contained in:
parent
f86e3f6905
commit
5bee567e34
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue