Proper escaping of tag patterns

Close #610
This commit is contained in:
Junegunn Choi 2017-04-04 17:45:37 +09:00
parent 7f4e6cb843
commit 46ae29985d
No known key found for this signature in database
GPG key ID: 254BC280FEF9C627

View file

@ -1063,7 +1063,7 @@ function! s:update_finish()
elseif has_key(spec, 'tag')
let tag = spec.tag
if tag =~ '\*'
let tags = s:lines(s:system('git tag --list '.string(tag).' --sort -version:refname 2>&1', spec.dir))
let tags = s:lines(s:system('git tag --list '.s:shellesc(tag).' --sort -version:refname 2>&1', spec.dir))
if !v:shell_error && !empty(tags)
let tag = tags[0]
call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag))