[DEV-7134] Escalate the error from finding the absolute path
We do not want to have a panic here. The error should be displayed properly.master
parent
bfea768f89
commit
590245e191
|
@ -43,7 +43,7 @@ pub fn main(package_path: &str, output: &str) -> Result<(), Box<dyn Error>> {
|
|||
let mut roots = Vec::new();
|
||||
let interner = DefaultInterner::new();
|
||||
|
||||
let abs_path = fs::canonicalize(package_path).unwrap();
|
||||
let abs_path = fs::canonicalize(package_path)?;
|
||||
|
||||
println!("WARNING: This is proof-of-concept; do not use!");
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ fn link_input_file_does_not_exist() -> Result<(), Box<dyn std::error::Error>> {
|
|||
cmd.arg("-o").arg("tests/data/test-output.xmle");
|
||||
cmd.assert()
|
||||
.failure()
|
||||
.code(1)
|
||||
.stderr(predicate::str::contains("No such file or directory"));
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in New Issue