Fix error message for file not found

This commit is contained in:
Richard Feldman 2021-07-26 22:17:30 -04:00
parent 537b71d258
commit 36cfede93c

View file

@ -151,8 +151,7 @@ pub fn build(target: &Triple, matches: &ArgMatches, config: BuildConfig) -> io::
LinkType::Executable
};
let path = Path::new(filename).canonicalize().unwrap();
let src_dir = path.parent().unwrap().canonicalize().unwrap();
let path = Path::new(filename);
// Spawn the root task
let path = path.canonicalize().unwrap_or_else(|err| {
@ -173,6 +172,7 @@ pub fn build(target: &Triple, matches: &ArgMatches, config: BuildConfig) -> io::
}
});
let src_dir = path.parent().unwrap().canonicalize().unwrap();
let res_binary_path = build_file(
&arena,
target,