summaryrefslogtreecommitdiff
path: root/lib/execute.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-12-14 20:56:04 +0100
committerBruno Haible <bruno@clisp.org>2020-12-14 23:48:26 +0100
commit0299e540e47d71207081f87de6ec7aa2ceed5d25 (patch)
treed41ef944841b2a29e42f788c936b163ea08bb103 /lib/execute.c
parent29d55bf8c7d0c5a4a3b4aa2d93d897ff8463eb4c (diff)
downloadgnulib-0299e540e47d71207081f87de6ec7aa2ceed5d25.tar.gz
findprog-in: Allow overriding the current directory.
* lib/findprog.h (find_in_given_path): Add directory argument. * lib/findprog-in.c (find_in_given_path): Likewise. * lib/execute.c (execute): Update caller. * lib/spawn-pipe.c (create_pipe): Likewise. * lib/windows-spawn.c (spawnpvech): Likewise. * NEWS: Mention the change.
Diffstat (limited to 'lib/execute.c')
-rw-r--r--lib/execute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/execute.c b/lib/execute.c
index bdc0c0c016..41a2239c8d 100644
--- a/lib/execute.c
+++ b/lib/execute.c
@@ -126,7 +126,7 @@ execute (const char *progname,
if (! IS_ABSOLUTE_FILE_NAME (prog_path))
{
const char *resolved_prog =
- find_in_given_path (prog_path, getenv ("PATH"), false);
+ find_in_given_path (prog_path, getenv ("PATH"), NULL, false);
if (resolved_prog == NULL)
goto fail_with_errno;
if (resolved_prog != prog_path)