Skip to content

Commit e044e5b

Browse files
authored
Merge pull request #393 from wedesoft/mlp-draft-2
Check Jank handle is valid
2 parents 3dc49c2 + 7195450 commit e044e5b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

site/_extensions/scicloj/jank/jank.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,11 @@ local function eval_jank_raw(code, timeout)
638638
local timeout_ms = timeout or "10000"
639639
local cmd = "clj-nrepl-eval -p " .. shell_quote(jank_port) .. " --timeout " .. shell_quote(tostring(timeout_ms)) .. " " .. shell_quote(code) .. " 2>&1"
640640
local handle = io.popen(cmd)
641+
642+
if not handle then
643+
return nil, "opening `" .. cmd .. "` returned nil handle."
644+
end
645+
641646
local raw = handle:read("*a")
642647
handle:close()
643648

0 commit comments

Comments
 (0)