diff options
author | Squibid <me@zacharyscheiman.com> | 2023-10-15 07:04:07 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2023-10-15 07:04:07 -0400 |
commit | 96c3e6f3e627e601d388f9884b81d896d82f5f1e (patch) | |
tree | 1589bb08777c1cbe2accb13efd68004f876e176f /eatit.lua | |
parent | 25765c4ace0898b8f30469023bb6670f779eff9e (diff) | |
download | eat-it-96c3e6f3e627e601d388f9884b81d896d82f5f1e.tar.gz eat-it-96c3e6f3e627e601d388f9884b81d896d82f5f1e.tar.bz2 eat-it-96c3e6f3e627e601d388f9884b81d896d82f5f1e.zip |
add nil checks
Diffstat (limited to '')
-rw-r--r-- | eatit.lua | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -47,6 +47,7 @@ end local function run(cmd) local x = io.popen(cmd) + if not x then return 1 end local y = x:read("*a") x:close() return y @@ -58,6 +59,7 @@ local function openlog() fn = mp.command_native({'expand-path', opts.logging.logfile}) f = io.open(fn, 'a') -- open file buffer + if not f then return 1 end io.output(f) -- set it as default end end |