diff options
-rw-r--r-- | libs/ipkg/luasrc/model/ipkg.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ipkg/luasrc/model/ipkg.lua b/libs/ipkg/luasrc/model/ipkg.lua index 73fa3c305c..d0d9788fd8 100644 --- a/libs/ipkg/luasrc/model/ipkg.lua +++ b/libs/ipkg/luasrc/model/ipkg.lua @@ -158,7 +158,9 @@ end -- List helper function _list(action, pat, cb) - local fd = io.popen(ipkg .. " " .. action .. (pat and " '*" .. pat:gsub("'", "") .. "*'" or "")) + local fd = io.popen(ipkg .. " " .. action .. + (pat and (" '%s'" % pat:gsub("'", "")) or "")) -- .. " | grep -vE '^ '") + if fd then local name, version, desc while true do |