Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make digestif working with ConTeXt standalone installation #68

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
safely execute system command and check for the errors
evgeniysharapov committed Jul 25, 2024
commit 5635a1f11f7bb8a835419cf519c049dc646963c3
4 changes: 2 additions & 2 deletions digestif/util.lua
Original file line number Diff line number Diff line change
@@ -391,8 +391,8 @@ local is_command_cmd = util.os_type == "windows"
-- Return `name` if an executable with that name exists, nil
-- otherwise.
local function is_command(name)
local ok = os.execute(format(is_command_cmd, name))
return ok and name or nil
local ok, err = pcall(os.execute, format(is_command_cmd, name)))
return err == 0 and ok and name or nil
end
util.is_command = is_command