fix: include error in message about not being able to create the TypeScript cache (#18356)

This commit is contained in:
David Sherret 2023-03-22 13:59:55 -04:00 committed by GitHub
parent 42d13c4e6a
commit 1f635b1eac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,9 +42,18 @@ impl DiskCache {
return Ok(());
}
fs::create_dir_all(path).map_err(|e| {
io::Error::new(e.kind(), format!(
"Could not create TypeScript compiler cache location: {path:?}\nCheck the permission of the directory."
))
io::Error::new(
e.kind(),
format!(
concat!(
"Could not create TypeScript compiler cache location: {}\n",
"Check the permission of the directory.\n",
"{:#}",
),
path.display(),
e
),
)
})
}