Mercurial > vim
comparison src/channel.c @ 18941:70d6614aaf28 v8.2.0031
patch 8.2.0031: MS-Windows: test for empty job fails
Commit: https://github.com/vim/vim/commit/ba0a7475c52ea0ba9e083934bd328fbcbfa8d532
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 22 16:09:06 2019 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 22 Dec 2019 16:15:04 +0100 |
parents | ab97d1aea4aa |
children | d90138662f49 |
comparison
equal
deleted
inserted
replaced
18940:9af4bf3b4f82 | 18941:70d6614aaf28 |
---|---|
5941 { | 5941 { |
5942 list_T *l = argvars[0].vval.v_list; | 5942 list_T *l = argvars[0].vval.v_list; |
5943 | 5943 |
5944 if (build_argv_from_list(l, &argv, &argc) == FAIL) | 5944 if (build_argv_from_list(l, &argv, &argc) == FAIL) |
5945 goto theend; | 5945 goto theend; |
5946 #ifndef USE_ARGV | 5946 |
5947 // Empty command is invalid. | |
5948 #ifdef USE_ARGV | |
5949 if (argc == 0 || *skipwhite((char_u *)argv[0]) == NUL) | |
5950 { | |
5951 emsg(_(e_invarg)); | |
5952 goto theend; | |
5953 } | |
5954 #else | |
5947 if (win32_build_cmd(l, &ga) == FAIL) | 5955 if (win32_build_cmd(l, &ga) == FAIL) |
5948 goto theend; | 5956 goto theend; |
5949 cmd = ga.ga_data; | 5957 cmd = ga.ga_data; |
5950 if (cmd == NULL) | 5958 if (cmd == NULL || *skipwhite(cmd) == NUL) |
5951 { | 5959 { |
5952 emsg(_(e_invarg)); | 5960 emsg(_(e_invarg)); |
5953 goto theend; | 5961 goto theend; |
5954 } | 5962 } |
5955 #endif | 5963 #endif |