diff options
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index ecf90869c4..d3dca00385 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -216,8 +216,11 @@ local function which(exe) local pipe = io.popen('which ' .. exe, 'r') local ret = pipe:read('*a') pipe:close() - assert(ret:sub(-1) == '\n') - return ret:sub(1, -2) + if ret == '' then + return nil + else + return ret:sub(1, -2) + end end return { |