diff --git a/source/dub/commandline.d b/source/dub/commandline.d index 861d91f..a19a8f4 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -616,12 +616,6 @@ else m_buildType = default_build_type; } - foreach (sc; m_overrideConfigs) { - auto idx = sc.indexOf('/'); - enforceUsage(idx >= 0, "Expected \"/\" as argument to --override-config."); - dub.project.overrideConfiguration(sc[0 .. idx], sc[idx+1 .. $]); - } - if (!m_nodeps) { // TODO: only upgrade(select) if necessary, only upgrade(upgrade) every now and then @@ -640,6 +634,12 @@ } dub.project.validate(); + + foreach (sc; m_overrideConfigs) { + auto idx = sc.indexOf('/'); + enforceUsage(idx >= 0, "Expected \"/\" as argument to --override-config."); + dub.project.overrideConfiguration(sc[0 .. idx], sc[idx+1 .. $]); + } } private bool loadSpecificPackage(Dub dub, string package_name)