From 2412e1ac97386c0f9399c713a3aafdec30a2ff08 Mon Sep 17 00:00:00 2001 From: lucas sprouole Date: Thu, 21 Dec 2023 10:28:50 -0500 Subject: [PATCH] fixes --- src/Command/Package/AddPackages.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Command/Package/AddPackages.cpp b/src/Command/Package/AddPackages.cpp index dff1669..18c82b1 100644 --- a/src/Command/Package/AddPackages.cpp +++ b/src/Command/Package/AddPackages.cpp @@ -47,7 +47,7 @@ namespace Frate::Command::Packages { if(inter->args->operator[]("latest").as()){ latest = true; } - if (inter->args->count("args") < 0){ + if (inter->args->count("args") < 1){ Utils::error << "No packages specified" << std::endl; return false; @@ -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(); + auto [valid, target] = target_link_prompt.get(); + + 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 != "") {