0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05:00

patch 8.2.0031: MS-Windows: test for empty job fails

Problem:    MS-Windows: test for empty job fails
Solution:   Check for error message, make it also fail on Unix.
This commit is contained in:
Bram Moolenaar
2019-12-22 16:09:06 +01:00
parent 64e74c9cc7
commit ba0a7475c5
3 changed files with 14 additions and 4 deletions

View File

@@ -5943,11 +5943,19 @@ job_start(
if (build_argv_from_list(l, &argv, &argc) == FAIL)
goto theend;
#ifndef USE_ARGV
// Empty command is invalid.
#ifdef USE_ARGV
if (argc == 0 || *skipwhite((char_u *)argv[0]) == NUL)
{
emsg(_(e_invarg));
goto theend;
}
#else
if (win32_build_cmd(l, &ga) == FAIL)
goto theend;
cmd = ga.ga_data;
if (cmd == NULL)
if (cmd == NULL || *skipwhite(cmd) == NUL)
{
emsg(_(e_invarg));
goto theend;