aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordacctal <dacctalyt@gmail.com>2026-04-13 01:33:08 +0000
committerdacctal <dacctalyt@gmail.com>2026-04-13 01:33:08 +0000
commit798e1c9d3de80a690ddc7702071bee2237817378 (patch)
tree1c0a77016819ad2767fda43850552ee74b1f51b4 /src
parent8af0d44643ee6e360871b3dc6225fb838b4d05a1 (diff)
moved initial arg check to cla_parse.c
Diffstat (limited to 'src')
-rw-r--r--src/cla_parse.cc2
-rw-r--r--src/main.cc5
2 files changed, 2 insertions, 5 deletions
diff --git a/src/cla_parse.cc b/src/cla_parse.cc
index ed29d2e..d1810d3 100644
--- a/src/cla_parse.cc
+++ b/src/cla_parse.cc
@@ -20,6 +20,8 @@
void cla_parse(int argc, char** argv) {
Pkg pkg;
+ if (!argv[1]) { help(); return; }
+
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "--link") == 0 || strcmp(argv[i], "-l") == 0) {
is_symlink_install = true;
diff --git a/src/main.cc b/src/main.cc
index ecce36a..ec4d108 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -4,15 +4,10 @@
#include <iostream>
#include "cla_parse.hh"
-#include "help.hh"
#include "setup_pkgit.hh"
int main(int argc, char *argv[]) {
setup_pkgit();
-
- if (!argv[1]) { help(); return 0; }
-
cla_parse(argc, argv);
-
return 0;
}