Merge branch 'rj/pager-die-upon-exec-failure'
When GIT_PAGER failed to spawn, depending on the code path taken, we failed immediately (correct) or just spew the payload to the standard output (incorrect). The code now always fail immediately when GIT_PAGER fails. * rj/pager-die-upon-exec-failure: pager: die when paging to non-existing command
This commit is contained in:
2
pager.c
2
pager.c
@@ -137,7 +137,7 @@ void setup_pager(void)
|
||||
pager_process.in = -1;
|
||||
strvec_push(&pager_process.env, "GIT_PAGER_IN_USE");
|
||||
if (start_command(&pager_process))
|
||||
return;
|
||||
die("unable to execute pager '%s'", pager);
|
||||
|
||||
/* original process continues, but writes to the pipe */
|
||||
dup2(pager_process.in, 1);
|
||||
|
||||
Reference in New Issue
Block a user