mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Don't use special strings if #() commands fail, just remove the format
(as if the command produced nothing). Makes constructions that can fail like '#(test whatever && echo foo)' work as they did before.
This commit is contained in:
parent
74c755f2ab
commit
2a8c2648f0
11
format.c
11
format.c
@ -175,17 +175,6 @@ format_job_callback(struct job *job)
|
|||||||
fj->job = NULL;
|
fj->job = NULL;
|
||||||
free(fj->out);
|
free(fj->out);
|
||||||
|
|
||||||
if (WIFEXITED(job->status) && WEXITSTATUS(job->status) != 0) {
|
|
||||||
xasprintf(&fj->out, "<'%s' exited with %d>", fj->cmd,
|
|
||||||
WEXITSTATUS(job->status));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (WIFSIGNALED(job->status)) {
|
|
||||||
xasprintf(&fj->out, "<'%s' got signal %d>", fj->cmd,
|
|
||||||
WTERMSIG(job->status));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
if ((line = evbuffer_readline(job->event->input)) == NULL) {
|
if ((line = evbuffer_readline(job->event->input)) == NULL) {
|
||||||
len = EVBUFFER_LENGTH(job->event->input);
|
len = EVBUFFER_LENGTH(job->event->input);
|
||||||
|
Loading…
Reference in New Issue
Block a user