Skip to content

Commit

Permalink
fix cli bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed May 31, 2024
1 parent e11b705 commit 2df5470
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/cli/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int main(int argc, char** argv, char** envp){
ymp_init(argv, argc);
if (get_bool("version")){
write_version();
return 0;
exit(0);
}if(argc < 2){
gchar* c1 = g_strconcat(_ ("No command given."), "\n", NULL);
gchar* c2 = g_strdup_printf ("\x1b[%dm%s\x1b[;0m", 31, _ ("ymp help"));
Expand Down
11 changes: 4 additions & 7 deletions src/cli/shell.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#include <ymp.h>

static gint _main (gint len, gchar** args){
ymp_init (args, len);
add_process ("shell", args + 1, len - 1);
int main(int argc, char** argv){
ymp_init (argv, argc);
add_process ("shell", argv + 1, argc - 1);
ymp_run ();
error (1);
return 0;
exit(0);
}

int main(int argc, char** argv){
return _main(argc, argv);
}

0 comments on commit 2df5470

Please sign in to comment.