From b08dc3ec195feb4ab69c898ab816c104d2aa1aa1 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 Jul 2019 16:37:07 +0200 Subject: win: jobstart(), system(): $PATHEXT-resolve exe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows: In order for jobstart(['foo']), system(['foo']) to find "foo.cmd", we must replace "foo" with "foo.cmd" before sending `argv` to process_spawn(). Rationale: jobstart([…]), system([…]) "executable" semantics should be consistent with the VimL executable() function. fix #9569 related: #10554 --- src/nvim/os/fs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/nvim/os') diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index 4a10b5199c..f34592d107 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -230,7 +230,7 @@ int os_exepath(char *buffer, size_t *size) /// Checks if the file `name` is executable. /// /// @param[in] name Filename to check. -/// @param[out] abspath Returns resolved executable path, if not NULL. +/// @param[out,allocated] abspath Returns resolved exe path, if not NULL. /// @param[in] use_path Also search $PATH. /// /// @return true if `name` is executable and @@ -271,6 +271,9 @@ bool os_can_exe(const char_u *name, char_u **abspath, bool use_path) } /// Returns true if `name` is an executable file. +/// +/// @param[in] name Filename to check. +/// @param[out,allocated] abspath Returns full exe path, if not NULL. static bool is_executable(const char *name, char_u **abspath) FUNC_ATTR_NONNULL_ARG(1) { -- cgit