Commented the current code.

The output directory is now also set at the start.
This commit is contained in:
Jason Travis Smith
2016-04-08 19:59:39 -04:00
parent d38f5c6291
commit 9897d90be9
3 changed files with 74 additions and 19 deletions

View File

@ -5,6 +5,7 @@ extern crate mason;
use std::env;
use std::path::PathBuf;
use mason::Processor;
@ -48,7 +49,21 @@ pub fn main()
None =>
{
output_dir = PathBuf::new();
// Try to just get the current directory.
match env::current_dir()
{
Ok(dir) =>
{
output_dir = PathBuf::from(dir);
}
Err(error) =>
{
// Then just default to "".
warn!("{}", error);
output_dir = PathBuf::new();
}
}
}
}