-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.lua
More file actions
24 lines (23 loc) · 696 Bytes
/
Copy pathmain.lua
File metadata and controls
24 lines (23 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
return {
entry = function()
local output, err_code = Command("code")
:stderr(Command.PIPED)
:arg(".")
:output()
if err_code ~= nil then
ya.notify({
title = "Failed to run code command",
content = "Status: " .. err_code,
level = "error",
timeout = 5,
})
elseif not output.status.success then
ya.notify({
title = "code in" .. cwd .. "failed, exit code " .. output.status.code,
content = output.stderr,
level = "error",
timeout = 5,
})
end
end
}