diff --git a/source/dub/commandline.d b/source/dub/commandline.d index 258f710..8e1da35 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -371,6 +371,8 @@ logDiagnostic("Checking for upgrades."); dub.upgrade(UpdateOptions.upgrade|UpdateOptions.printUpgradesOnly); } + + dub.project.validate(); } private bool loadSpecificPackage(Dub dub, string package_name) diff --git a/source/dub/project.d b/source/dub/project.d index 038f0e4..1d54962 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -163,12 +163,8 @@ return cfgs[m_rootPackage.name]; } - /// Rereads the applications state. - void reinit() + void validate() { - m_dependencies = null; - m_packageManager.refresh(false); - // some basic package lint m_rootPackage.warnOnSpecialCompilerFlags(); if (m_rootPackage.name != m_rootPackage.name.toLower()) { @@ -186,6 +182,13 @@ ~ "dependency to use a branch instead.", dn, SelectedVersions.defaultFile); } + } + + /// Rereads the applications state. + void reinit() + { + m_dependencies = null; + m_packageManager.refresh(false); void collectDependenciesRec(Package pack) {