Mod get_install_path to ret Arc<Path> instead of PathBuf

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-23 18:37:59 +10:00
parent 5620810c55
commit 5ea66574c3
No known key found for this signature in database
GPG key ID: 591C0B03040416D6
2 changed files with 7 additions and 6 deletions

View file

@ -242,10 +242,10 @@ async fn entry(jobserver_client: LazyJobserverClient) -> Result<()> {
// Compute install directory
let (install_path, custom_install_path) = get_install_path(opts.install_path.as_deref());
let install_path: Arc<Path> = Arc::from(install_path.ok_or_else(|| {
let install_path = install_path.ok_or_else(|| {
error!("No viable install path found of specified, try `--install-path`");
miette!("No install path found or specified")
})?);
})?;
debug!("Using install path: {}", install_path.display());
// Create a temporary directory for downloads etc.