diff options
-rw-r--r-- | compat/mingw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 5dbaae981e..32fc02e360 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1439,7 +1439,8 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen BOOL ret; HANDLE cons; const char *(*quote_arg)(const char *arg) = - is_msys2_sh(*argv) ? quote_arg_msys2 : quote_arg_msvc; + is_msys2_sh(cmd ? cmd : *argv) ? + quote_arg_msys2 : quote_arg_msvc; do_unset_environment_variables(); |