diff options
author | Daniel Hahler <git@thequod.de> | 2019-12-24 07:53:56 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-12-24 07:53:56 +0100 |
commit | b3686b1597ea202de464df72a88fb5c76fd1b814 (patch) | |
tree | 558e4c3a3eadc2e4338cbe24fd785b2bf774a5fd /src/nvim/eval.c | |
parent | 53fe877a97dbe5e5b5291fd1361123fc1b1da054 (diff) | |
download | rneovim-b3686b1597ea202de464df72a88fb5c76fd1b814.tar.gz rneovim-b3686b1597ea202de464df72a88fb5c76fd1b814.tar.bz2 rneovim-b3686b1597ea202de464df72a88fb5c76fd1b814.zip |
system(), jobstart(): raise error on non-executable #11234
* tv_to_argv: error when cmd is not executable
Callers always assume that emsg was emitted:
- https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L12509
- https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L17923
- https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L18202
* test/functional/provider: display reason from missing_provider
* provider#node#Detect: skip / handle non-existing node executable
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 8749c7d8f0..65f029649c 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -12536,6 +12536,9 @@ static char **tv_to_argv(typval_T *cmd_tv, const char **cmd, bool *executable) char *exe_resolved = NULL; if (!arg0 || !os_can_exe(arg0, &exe_resolved, true)) { if (arg0 && executable) { + char buf[IOSIZE]; + snprintf(buf, sizeof(buf), "'%s' is not executable", arg0); + EMSG3(_(e_invargNval), "cmd", buf); *executable = false; } return NULL; |