diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-03-20 21:08:48 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-03-20 21:08:50 +0100 |
commit | 4c9ae70d3f7b99635f68796c8fca072a1baaf009 (patch) | |
tree | 3e0e8885b3d6087e07c4ad0c3a68f3ada612b094 /src | |
parent | c278e2da0cf9aee161e23771125629bdfe8d5d89 (diff) | |
download | blogc-4c9ae70d3f7b99635f68796c8fca072a1baaf009.tar.gz blogc-4c9ae70d3f7b99635f68796c8fca072a1baaf009.tar.bz2 blogc-4c9ae70d3f7b99635f68796c8fca072a1baaf009.zip |
make: exec: always print stderr, if available
... otherwise blogc warnings are hidden
Diffstat (limited to 'src')
-rw-r--r-- | src/blogc-make/exec.c | 11 |
1 files 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, |