Skip to content

Commit

Permalink
keychain: handle spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
wfaulk authored Apr 10, 2024
1 parent 5de0550 commit d0926fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Keychain.spoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function obj:getItem(options)

for key, value in pairs(keyTocmd) do
if options[key] ~= nil then
cmd = cmd .. " " .. value .. " " .. options[key]
cmd = cmd .. " " .. value .. " '" .. options[key] .. "'"
end
end

Expand Down Expand Up @@ -156,11 +156,11 @@ function obj:addPassword(options)

for key, value in pairs(keyTocmd) do
if options[key] ~= nil then
cmd = cmd .. " " .. value .. " " .. options[key]
cmd = cmd .. " " .. value .. " '" .. options[key] .. "'"
end
end

cmd = cmd .. "-w " .. options.password
cmd = cmd .. "-w '" .. options.password .. "'"
local handle = io.popen(cmd)
local result = handle:read("*a")

Expand Down

0 comments on commit d0926fe

Please sign in to comment.