From d0926fe5b571f68b3961f01b31ca02b15e7f9db9 Mon Sep 17 00:00:00 2001 From: wfaulk Date: Wed, 10 Apr 2024 18:50:06 -0400 Subject: [PATCH] keychain: handle spaces --- Source/Keychain.spoon/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Keychain.spoon/init.lua b/Source/Keychain.spoon/init.lua index 963c5006..08a0c5b3 100644 --- a/Source/Keychain.spoon/init.lua +++ b/Source/Keychain.spoon/init.lua @@ -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 @@ -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")