From 4c9ae70d3f7b99635f68796c8fca072a1baaf009 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Tue, 20 Mar 2018 21:08:48 +0100 Subject: make: exec: always print stderr, if available ... otherwise blogc warnings are hidden --- src/blogc-make/exec.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/blogc-make/exec.c b/src/blogc-make/exec.c index 7fe96e5..aaae523 100644 --- a/src/blogc-make/exec.c +++ b/src/blogc-make/exec.c @@ -307,6 +307,10 @@ bm_exec_blogc(bm_ctx_t *ctx, bc_trie_t *global_variables, bc_trie_t *local_varia int rv = bm_exec_command(cmd, input->str, &out, &err, &error); + if (err != NULL) { + fprintf(stderr, "%s", err); + } + if (error != NULL) { bc_error_print(error, "blogc-make"); free(cmd); @@ -337,13 +341,6 @@ bm_exec_blogc(bm_ctx_t *ctx, bc_trie_t *global_variables, bc_trie_t *local_varia "----------------------------->8-----------------------------\n", bc_str_strip(out)); } - if (err != NULL) { - fprintf(stderr, "\nSTDERR:\n" - "----------------------------->8-----------------------------\n" - "%s\n" - "----------------------------->8-----------------------------\n", - bc_str_strip(err)); - } } else { fprintf(stderr, -- cgit v1.2.3-18-g5258