Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
drug007 committed Aug 10, 2021
1 parent dd13ff1 commit ea5e37f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/reggae/dub/interop/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,26 @@ private from!"reggae.dub.info".DubInfo getDubInfo

auto settings = dub.getGeneratorSettings(options);
const configs = dubConfigurations(output, dub, options, settings);
bool atLeastOneConfigOk;
string someValidConfig;
Exception dubInfoFailure;

foreach(config; configs.configurations) {
try {
handleDubConfig(output, dub, options, settings, config);
atLeastOneConfigOk = true;
someValidConfig = config;
} catch(Exception ex) {
output.log("ERROR: Could not get info for configuration ", config, ": ", ex.msg);
output.log("ERROR: Could not get info for configuration \"", config, "\": ", ex.msg);
if(dubInfoFailure is null) dubInfoFailure = ex;
}
}

gDubInfos["default"] = gDubInfos[configs.default_];

if(!atLeastOneConfigOk) {
}
if(!someValidConfig.length) {
assert(dubInfoFailure !is null,
"Internal error: no configurations worked and no exception to throw");
throw dubInfoFailure;
}

const cfg = (configs.default_ in gDubInfos) ? configs.default_ : someValidConfig;
gDubInfos["default"] = gDubInfos[cfg];
}

return gDubInfos["default"];
Expand Down

0 comments on commit ea5e37f

Please sign in to comment.