mirror of
https://github.com/xHyroM/gimi.git
synced 2024-11-23 16:11:05 +01:00
Compare commits
2 commits
e937523a25
...
36883321ab
Author | SHA1 | Date | |
---|---|---|---|
36883321ab | |||
7e9d29d806 |
4 changed files with 13 additions and 12 deletions
|
@ -112,7 +112,7 @@ int generate(int argc, char **argv) {
|
|||
provider = config_find_provider(cfg, argv[1]);
|
||||
|
||||
if (provider == NULL) {
|
||||
printf("error: no such provider '%s'", argv[1]);
|
||||
printf("error: no such provider '%s'\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
|
@ -124,7 +124,7 @@ int generate(int argc, char **argv) {
|
|||
}
|
||||
|
||||
if (provider == NULL) {
|
||||
printf("error: can't find primary provider");
|
||||
printf("error: can't find primary provider\n");
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
@ -135,14 +135,15 @@ int generate(int argc, char **argv) {
|
|||
|
||||
int ret = mkdir(".builds", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
|
||||
if (ret != 0 && errno != EEXIST) {
|
||||
printf("error: failed to create directory .builds with errno %d", errno);
|
||||
printf("error: failed to create directory .builds with errno %d\n",
|
||||
errno);
|
||||
return ret;
|
||||
}
|
||||
|
||||
FILE *file_ptr;
|
||||
file_ptr = fopen(".builds/gimi.yml", "w");
|
||||
if (file_ptr == NULL) {
|
||||
printf("error: failed to open file .builds/gimi.yml");
|
||||
printf("error: failed to open file .builds/gimi.yml\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -150,7 +151,7 @@ int generate(int argc, char **argv) {
|
|||
|
||||
fclose(file_ptr);
|
||||
} else {
|
||||
printf("error: provider '%s' is not supported, create the ci yourself.",
|
||||
printf("error: provider '%s' is not supported, create the ci yourself.\n",
|
||||
provider->name);
|
||||
|
||||
config_free(cfg);
|
||||
|
@ -166,7 +167,7 @@ int generate(int argc, char **argv) {
|
|||
|
||||
int cli_command_ci(int argc, char **argv) {
|
||||
if (argc == 1) {
|
||||
printf("usage: gimi ci generate [provider]");
|
||||
printf("usage: gimi ci generate [provider]\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ int providers() {
|
|||
|
||||
int provider_info(int argc, char **argv) {
|
||||
if (argc == 1) {
|
||||
printf("usage: gimi provider info <name>");
|
||||
printf("usage: gimi provider info <name>\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ int provider_info(int argc, char **argv) {
|
|||
struct gimi_config_provider *provider = config_find_provider(cfg, argv[1]);
|
||||
|
||||
if (!provider) {
|
||||
printf("error: no such provider '%s'", argv[1]);
|
||||
printf("error: no such provider '%s'\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ int provider_info(int argc, char **argv) {
|
|||
|
||||
int provider_sync(int argc, char **argv) {
|
||||
if (argc == 1) {
|
||||
printf("usage: gimi provider sync [--all] [name]");
|
||||
printf("usage: gimi provider sync [--all] [name]\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,8 +92,8 @@ int cli_command_push(int argc, char **argv) {
|
|||
MASK_OPTION('d', options, DELETE_BRANCH_OPTION));
|
||||
|
||||
if ((options & DELETE_BRANCH_OPTION) && (options & PUSH_TAGS_OPTION)) {
|
||||
printf(
|
||||
"error: options '-d' (delete) and '-t' (tags) cannot be used together");
|
||||
printf("error: options '-d' (delete) and '-t' (tags) cannot be used "
|
||||
"together\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
int main(int argc, char **argv) {
|
||||
if (argc == 1) {
|
||||
cli_print_help();
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) {
|
||||
|
|
Loading…
Reference in a new issue