Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lsproule committed Dec 21, 2023
1 parent 1d7d129 commit d78a55a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Command/Package/AddPackages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ namespace Frate::Command::Packages {
if(inter->args->operator[]("latest").as<bool>()){
latest = true;
}
if (inter->args->count("args") < 0){
Utils::error << "No packages specified" << std::endl;
return false;

}
std::vector<std::string> package_names = inter->args->operator[]("args").as<std::vector<std::string>>();
if (git != "") {
std::cout << "Adding git package" << std::endl;
std::cout << "Git: " << git << std::endl;
Expand All @@ -66,11 +72,11 @@ namespace Frate::Command::Packages {
return false;
}
}

Package package;
package.name = git;
package.name = package_names[0];
package.selected_version = version;
package.target_link = target_link;
package.git = git;
package.versions.push_back(version);
if (mode != "") {
if (!addPackageToMode(inter, package, mode)) {
Expand All @@ -89,7 +95,6 @@ namespace Frate::Command::Packages {
}


std::vector<std::string> package_names = inter->args->operator[]("args").as<std::vector<std::string>>();
for (std::string package_name : package_names) {
Utils::info << "Searching for " << package_name << std::endl;

Expand Down

0 comments on commit d78a55a

Please sign in to comment.