mirror of
https://github.com/xHyroM/gimi.git
synced 2024-11-24 00:21:04 +01:00
fix: print with new lines at the end
This commit is contained in:
parent
7e9d29d806
commit
36883321ab
3 changed files with 12 additions and 11 deletions
|
@ -112,7 +112,7 @@ int generate(int argc, char **argv) {
|
||||||
provider = config_find_provider(cfg, argv[1]);
|
provider = config_find_provider(cfg, argv[1]);
|
||||||
|
|
||||||
if (provider == NULL) {
|
if (provider == NULL) {
|
||||||
printf("error: no such provider '%s'", argv[1]);
|
printf("error: no such provider '%s'\n", argv[1]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -124,7 +124,7 @@ int generate(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (provider == NULL) {
|
if (provider == NULL) {
|
||||||
printf("error: can't find primary provider");
|
printf("error: can't find primary provider\n");
|
||||||
return 1;
|
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);
|
int ret = mkdir(".builds", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
|
||||||
if (ret != 0 && errno != EEXIST) {
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *file_ptr;
|
FILE *file_ptr;
|
||||||
file_ptr = fopen(".builds/gimi.yml", "w");
|
file_ptr = fopen(".builds/gimi.yml", "w");
|
||||||
if (file_ptr == NULL) {
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +151,7 @@ int generate(int argc, char **argv) {
|
||||||
|
|
||||||
fclose(file_ptr);
|
fclose(file_ptr);
|
||||||
} else {
|
} 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);
|
provider->name);
|
||||||
|
|
||||||
config_free(cfg);
|
config_free(cfg);
|
||||||
|
@ -166,7 +167,7 @@ int generate(int argc, char **argv) {
|
||||||
|
|
||||||
int cli_command_ci(int argc, char **argv) {
|
int cli_command_ci(int argc, char **argv) {
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
printf("usage: gimi ci generate [provider]");
|
printf("usage: gimi ci generate [provider]\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ int providers() {
|
||||||
|
|
||||||
int provider_info(int argc, char **argv) {
|
int provider_info(int argc, char **argv) {
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
printf("usage: gimi provider info <name>");
|
printf("usage: gimi provider info <name>\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ int provider_info(int argc, char **argv) {
|
||||||
struct gimi_config_provider *provider = config_find_provider(cfg, argv[1]);
|
struct gimi_config_provider *provider = config_find_provider(cfg, argv[1]);
|
||||||
|
|
||||||
if (!provider) {
|
if (!provider) {
|
||||||
printf("error: no such provider '%s'", argv[1]);
|
printf("error: no such provider '%s'\n", argv[1]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ int provider_info(int argc, char **argv) {
|
||||||
|
|
||||||
int provider_sync(int argc, char **argv) {
|
int provider_sync(int argc, char **argv) {
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
printf("usage: gimi provider sync [--all] [name]");
|
printf("usage: gimi provider sync [--all] [name]\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,8 +92,8 @@ int cli_command_push(int argc, char **argv) {
|
||||||
MASK_OPTION('d', options, DELETE_BRANCH_OPTION));
|
MASK_OPTION('d', options, DELETE_BRANCH_OPTION));
|
||||||
|
|
||||||
if ((options & DELETE_BRANCH_OPTION) && (options & PUSH_TAGS_OPTION)) {
|
if ((options & DELETE_BRANCH_OPTION) && (options & PUSH_TAGS_OPTION)) {
|
||||||
printf(
|
printf("error: options '-d' (delete) and '-t' (tags) cannot be used "
|
||||||
"error: options '-d' (delete) and '-t' (tags) cannot be used together");
|
"together\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue