Skip to content

Commit

Permalink
ConfigPackageUtility::PackageExists(): accept invalid package names, too
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed Aug 2, 2021
1 parent c666f81 commit c1df4b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/remote/configpackageutility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ std::vector<String> ConfigPackageUtility::GetPackages()

bool ConfigPackageUtility::PackageExists(const String& name)
{
return Utility::PathExists(GetPackageDir() + "/" + name);
auto packages (GetPackages());
return std::find(packages.begin(), packages.end(), name) != packages.end();
}

String ConfigPackageUtility::CreateStage(const String& packageName, const Dictionary::Ptr& files)
Expand Down

0 comments on commit c1df4b7

Please sign in to comment.