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 d78a55a commit 2412e1a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Command/Package/AddPackages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace Frate::Command::Packages {
if(inter->args->operator[]("latest").as<bool>()){
latest = true;
}
if (inter->args->count("args") < 0){
if (inter->args->count("args") < 1){
Utils::error << "No packages specified" << std::endl;
return false;

Expand All @@ -66,16 +66,19 @@ namespace Frate::Command::Packages {
if (target_link == "") {
Prompt target_link_prompt("Specify target_link: ");
target_link_prompt.run();
auto [valid, target_link] = target_link_prompt.get<std::string>();
auto [valid, target] = target_link_prompt.get<std::string>();

target_link = target;
if (!valid) {
Utils::error << "Failed to get target_link" << std::endl;
return false;
}
}

std::cout << "Target_link: " << target_link << std::endl;
Package package;
package.name = package_names[0];
package.selected_version = version;
package.git = git;
package.target_link = target_link;
package.versions.push_back(version);
if (mode != "") {
Expand Down

0 comments on commit 2412e1a

Please sign in to comment.