From b65025ef62612eec2d0a17eff9b641e516476e16 Mon Sep 17 00:00:00 2001 From: Yauhen Kirylau Date: Mon, 24 May 2021 06:55:04 +0200 Subject: [PATCH] feat(awesome: main: check): print config path, and do it to stdout (#2901) feat(awesome: main: check): combine two error messages together feat(awesome: main: check): print newline before ERROR chore(awesome: check): change message Co-Authored-By: Uli Schlachter Co-authored-by: Uli Schlachter --- awesome.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/awesome.c b/awesome.c index a56a1d491..5b3498aa0 100644 --- a/awesome.c +++ b/awesome.c @@ -619,13 +619,14 @@ main(int argc, char **argv) bool success = true; /* Get the first config that will be tried */ const char *config = luaA_find_config(&xdg, confpath, true_config_callback); + fprintf(stdout, "Checking config '%s'... ", config); /* Try to parse it */ lua_State *L = luaL_newstate(); if(luaL_loadfile(L, config)) { const char *err = lua_tostring(L, -1); - fprintf(stderr, "%s\n", err); + fprintf(stdout, "\nERROR: %s\n", err); success = false; } p_delete(&config); @@ -633,12 +634,11 @@ main(int argc, char **argv) if(!success) { - fprintf(stderr, "✘ Configuration file syntax error.\n"); return EXIT_FAILURE; } else { - fprintf(stderr, "✔ Configuration file syntax OK.\n"); + fprintf(stdout, "OK\n"); return EXIT_SUCCESS; } }