diff --git a/source/dub/dub.d b/source/dub/dub.d index 181e592..000f8f8 100644 --- a/source/dub/dub.d +++ b/source/dub/dub.d @@ -215,7 +215,7 @@ fetchOpts |= (options & UpgradeOptions.preRelease) != 0 ? FetchOptions.usePrerelease : FetchOptions.none; fetchOpts |= (options & UpgradeOptions.forceRemove) != 0 ? FetchOptions.forceRemove : FetchOptions.none; if (!pack) fetch(p, ver, PlacementLocation.userWide, fetchOpts); - if ((options & UpgradeOptions.select) && ver.path.empty) + if ((options & UpgradeOptions.select) && ver.path.empty && p != m_project.rootPackage.name) m_project.selections.selectVersion(p, ver.version_); } diff --git a/source/dub/project.d b/source/dub/project.d index fe919c6..d9e50bd 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -787,12 +787,14 @@ this(Json data) { deserialize(data); + m_dirty = false; } this(Path path) { auto json = jsonFromFile(path); deserialize(json); + m_dirty = false; } @property string[] selectedPackages() const { return m_selections.keys; }