aboutsummaryrefslogtreecommitdiff
path: root/src/cla_parse.cc
diff options
context:
space:
mode:
authordacctal <dacctalyt@gmail.com>2026-04-14 22:54:24 +0000
committerdacctal <dacctalyt@gmail.com>2026-04-14 22:54:24 +0000
commit574708a5f97907c4b4e67788d38f89fac0981b70 (patch)
tree889c8e37b536517ecdace81f5a699fb51e878d7f /src/cla_parse.cc
parent3f48bd15a079c5d4feb04e974102238de78249c3 (diff)
added root config
Diffstat (limited to 'src/cla_parse.cc')
-rw-r--r--src/cla_parse.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cla_parse.cc b/src/cla_parse.cc
index d1810d3..c721fb9 100644
--- a/src/cla_parse.cc
+++ b/src/cla_parse.cc
@@ -35,8 +35,10 @@ void cla_parse(int argc, char** argv) {
for (int j = i+1; i < argc; j++) {
if (argv[j]) {
add_repo(argv[j], name_from_url(argv[j]));
+ return;
} else {
std::cout << print_error << "Not enough arguments! Try: `pkgit add [url]`";
+ return;
}
}
@@ -44,8 +46,10 @@ void cla_parse(int argc, char** argv) {
for (int j = i+1; i < argc; j++) {
if (argv[j]) {
build(argv[j]);
+ return;
} else {
build(std::filesystem::current_path().string().c_str());
+ return;
}
}
@@ -54,8 +58,10 @@ void cla_parse(int argc, char** argv) {
pkg = create_pkg(argv[j]);
if (argv[j]) {
install_pkg(pkg);
+ return;
} else {
std::cout << print_error << "Not enough arguments! Try: `pkgit install [url/pkg]`";
+ return;
}
}
@@ -64,22 +70,28 @@ void cla_parse(int argc, char** argv) {
pkg = create_pkg(argv[j]);
if (argv[j]) {
remove_pkg(pkg);
+ return;
} else {
std::cout << print_error << "Not enough arguments! Try: `pkgit remove [url/pkg]`";
+ return;
}
}
} else if (strcmp(argv[i], "update") == 0 || strcmp(argv[i], "u") == 0) {
update_all();
+ return;
} else if (strcmp(argv[i], "list") == 0 || strcmp(argv[i], "l") == 0) {
list_pkgs();
+ return;
} else if (strcmp(argv[i], "help") == 0 || strcmp(argv[i], "h") == 0) {
help();
+ return;
} else {
help();
+ return;
}
}
}