Commit 7e06c6b8 authored by Heinz N. Gies's avatar Heinz N. Gies

Return correct errro for already imported datasets

parent 4487694c
Pipeline #12652838 canceled with stages
in 2 minutes and 8 seconds
[root]
name = "vmadm"
version = "0.3.0"
version = "0.3.2"
dependencies = [
"aud 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"bzip2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
......
[package]
name = "vmadm"
version = "0.3.1"
version = "0.3.2"
authors = ["Heinz N. Gies <heinz@project-fifo.net>"]
[dependencies]
......
......@@ -198,7 +198,8 @@ pub fn import(config: &Config, uuid: Uuid) -> Result<i32, Box<Error>> {
url.push_str(uuid_str.as_str());
if zfs::is_present(dataset.as_str()) {
return Err(GenericError::bx("Image already imported"));
let err = format!("Image {} already imported", uuid_str);
return Err(GenericError::bx(err.as_str()));
};
debug!("Fethcing image"; "repo" => config.settings.repo.clone(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment