mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 01:34:18 +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:
		
							
								
								
									
										11
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								format.c
									
									
									
									
									
								
							@@ -175,17 +175,6 @@ format_job_callback(struct job *job)
 | 
			
		||||
	fj->job = NULL;
 | 
			
		||||
	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;
 | 
			
		||||
	if ((line = evbuffer_readline(job->event->input)) == NULL) {
 | 
			
		||||
		len = EVBUFFER_LENGTH(job->event->input);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user