Skip to content

Commit

Permalink
Move isTestConfig to DubConfigurations
Browse files Browse the repository at this point in the history
  • Loading branch information
atilaneves committed Feb 28, 2024
1 parent ee90192 commit bad5653
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions payload/reggae/dub/interop/dublib.d
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ private struct DubConfigurations {
bool haveTestConfig() @safe @nogc pure nothrow scope const {
return test != "";
}

bool isTestConfig(in string config) @safe @nogc pure nothrow scope const {
return haveTestConfig && config == test;
}
}

package struct Dub {
Expand Down Expand Up @@ -91,9 +95,8 @@ package struct Dub {
Exception dubInfoFailure;

foreach(config; configs.configurations) {
const isTestConfig = configs.haveTestConfig && config == configs.test;
try {
ret[config] = configToDubInfo(output, config, isTestConfig);
ret[config] = configToDubInfo(output, config, configs.isTestConfig(config));
atLeastOneConfigOk = true;
} catch(Exception ex) {
output.log("ERROR: Could not get info for configuration ", config, ": ", ex.msg);
Expand Down

0 comments on commit bad5653

Please sign in to comment.