build(bump_deps.lua): run command -v in shell (#22030)

When I run ./scripts/bump_deps.lua I get an error:

  Vim:E475: Invalid value for argument cmd: 'command' is not executable

Running command -v in shell fixes this.
This commit is contained in:
zeertzjq 2023-01-30 07:15:38 +08:00 committed by GitHub
parent c9ac4e4877
commit 3ac55fe083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ local function run_die(cmd, err_msg)
end
local function require_executable(cmd)
local cmd_path = run_die({ 'command', '-v', cmd }, cmd .. ' not found!')
local cmd_path = run_die({ 'sh', '-c', 'command -v ' .. cmd }, cmd .. ' not found!')
run_die({ 'test', '-x', cmd_path }, cmd .. ' is not executable')
end