Skip to content

Commit

Permalink
fix: handle packadd failing without an error message (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Oct 15, 2024
1 parent 7909ea2 commit f1ec104
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/rocks/runtime.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ local log = require("rocks.log")
---@class rocks.PackaddOpts
---@field bang? boolean

---@param err_msg string
---@param err_msg? string
---@return nil | boolean
local function is_not_found(err_msg)
return err_msg:find("Directory not found in 'packpath'") ~= nil
return err_msg and err_msg:find("Directory not found in 'packpath'") ~= nil
end

---@param rock Rock
Expand Down

0 comments on commit f1ec104

Please sign in to comment.