diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-11-05 18:07:25 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2023-11-05 21:56:56 +0100 |
commit | b329a21bd38ff4eda635c063a0c2580ad99fe0aa (patch) | |
tree | 8fad8303fa1ed17b93e6041afd26c7eb5aa426a0 /runtime/lua/vim/_meta/api.lua | |
parent | dcf5999fcd706c4319fb9c12bf9b46f2dd2b51b2 (diff) | |
download | rneovim-b329a21bd38ff4eda635c063a0c2580ad99fe0aa.tar.gz rneovim-b329a21bd38ff4eda635c063a0c2580ad99fe0aa.tar.bz2 rneovim-b329a21bd38ff4eda635c063a0c2580ad99fe0aa.zip |
vim-patch:3d37231437fc
runtime(tar): improve the error detection
Do not rely on the fact, that the last line matches warning, error,
inappropriate or unrecognized to determine if an error occurred. It
could also be a file, contains such a keyword.
So make the error detection slightly more strict and only assume an
error occured, if in addition to those 4 keywords, also a space matches
(this assumes the error message contains a space), which luckily on Unix
not many files match by default.
The whole if condition seems however slightly dubious. In case an error
happened, this would probably already be caught in the previous if
statement, since this checks for the return code of the tar program.
There may however be tar implementations, that do not set the exit code
for some kind of error (but print an error message)? But let's keep this
check for now, not many people have noticed this behaviour until now, so
it seems to work reasonably well anyhow.
related: vim/vim#6425
fixes: vim/vim#13489
https://github.com/vim/vim/commit/3d37231437fc0f761664a7cabc8f7b927b468767
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
0 files changed, 0 insertions, 0 deletions