diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-04-22 13:42:44 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-04-22 13:42:44 -0700 |
| commit | d01b722b7a077202c82902f49c48cb8081c696ef (patch) | |
| tree | 0a72203d0a9f8abd6f6efbaa9e87cd68b946604f /run-command.c | |
| parent | Merge branch 'dr/midx-avoid-int-underflow' (diff) | |
| parent | run-command: trigger PATH lookup properly on Cygwin (diff) | |
| download | git-d01b722b7a077202c82902f49c48cb8081c696ef.tar.gz git-d01b722b7a077202c82902f49c48cb8081c696ef.zip | |
Merge branch 'ak/run-command-on-cygwin-fix'
Utitiles run via the run_command() API were not spawned correctly
on Cygwin, when the paths to them are given as a full path with
backslashes.
* ak/run-command-on-cygwin-fix:
run-command: trigger PATH lookup properly on Cygwin
Diffstat (limited to 'run-command.c')
| -rw-r--r-- | run-command.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/run-command.c b/run-command.c index f5e1149f9b..0f41af3b55 100644 --- a/run-command.c +++ b/run-command.c @@ -421,12 +421,12 @@ static int prepare_cmd(struct argv_array *out, const struct child_process *cmd) } /* - * If there are no '/' characters in the command then perform a path - * lookup and use the resolved path as the command to exec. If there - * are '/' characters, we have exec attempt to invoke the command - * directly. + * If there are no dir separator characters in the command then perform + * a path lookup and use the resolved path as the command to exec. If + * there are dir separator characters, we have exec attempt to invoke + * the command directly. */ - if (!strchr(out->argv[1], '/')) { + if (!has_dir_sep(out->argv[1])) { char *program = locate_in_PATH(out->argv[1]); if (program) { free((char *)out->argv[1]); |
