Skip to content

Commit

Permalink
fix: non-zero return for plugin success in dd4hep-1.22
Browse files Browse the repository at this point in the history
As of DD4hep-1.22, AIDASoft/DD4hep#936, any plugin returning a zero return value is assumed to have failed. This is somewhat counter-intuitive for plugins that simply return a long status code, but it is inteded to allow recursive calls and is in line with what other plugins already do, e.g. `return field` or `return sdet`.
  • Loading branch information
wdconinc authored Aug 27, 2022
1 parent 2db1f7f commit f29403b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/FileLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,14 @@ long load_file(Detector& /* desc */, int argc, char** argv)
// if file or url is empty, do nothing
if (file.empty()) {
printout(WARNING, "FileLoader", "no file specified");
return 0;
}
if (url.empty()) {
printout(WARNING, "FileLoader", "no url specified");
return 0;
}

EnsureFileFromURLExists(url, file, cache, cmd);

return 0;
return 1;
}

#ifdef EPIC_ECCE_LEGACY_COMPAT
Expand Down

0 comments on commit f29403b

Please sign in to comment.