Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
Working build with multiple parsing errors figured out temporarily. C…
Browse files Browse the repository at this point in the history
…ode cleanup really should be done.
  • Loading branch information
Captainjamason committed Feb 9, 2024
1 parent 02048df commit c796e9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@
*.app

build
.cache/
.cache/
*.core
6 changes: 4 additions & 2 deletions src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ int CLI::help(vector<CLI::entryData> entries) {
// application side function...
int CLI::parse(vector<CLI::entryData> entries, vector<string> args) {
// if no args then stop, no need to be wasting time.
if(args.size() == 0) {
if(args.size() == 0 && debug != true) {
error("No arguments provided... Please use --help");
exit(1);
}
}
// Iterate over args provided...
for(int i = 0; i < args.size(); i++) {
// Hardcoded debugging command. Useful for developers...
Expand All @@ -115,8 +115,10 @@ int CLI::parse(vector<CLI::entryData> entries, vector<string> args) {
}
if(args[i] == entries[j].shand) {
entries[j].func();
return(0);
} else if (args[i] == entries[j].lhand) {
entries[j].func();
return(0);
}
// This specific clause is needed for the debug to work
// without interrupting the program flow.
Expand Down

0 comments on commit c796e9c

Please sign in to comment.