pull: fix error message when directory already exists
CI / build (push) Successful in 15m39s
CI / snap (push) Failing after 39s

This commit is contained in:
2026-08-12 16:43:45 +02:00
parent 317dbcd062
commit 7c3ce1caa5
+8
View File
@@ -573,6 +573,14 @@ pub async fn pull(
Path::new(package).to_path_buf()
};
if package_dir.exists() {
return Err(format!(
"Directory '{}' already exists. Remove it first, or change working directory.",
package_dir.display()
)
.into());
}
/* Fetch the package: either via git (preferred VCS) or the archive */
if let Some(ref url) = package_info.preferred_vcs
&& !force_archive