diff --git a/bin/git-credential-keyring b/bin/git-credential-keyring index 02a50d7..6a7f87d 100755 --- a/bin/git-credential-keyring +++ b/bin/git-credential-keyring @@ -15,7 +15,7 @@ end if action == "get" then local command = string.format('secret-tool lookup application git username %s host %s', options.username, options.host, options.username, options.host) - local file = io.popen(command, "r") + local file = assert(io.popen(command, "r")) local password = file:read("all") if password~="" then print("password="..password) @@ -25,7 +25,7 @@ if action == "get" then file:close() elseif action == "store" then local command = string.format('secret-tool store --label="git %s@%s" application git username %s host %s', options.username, options.host, options.username, options.host) - local file = io.popen(command, "w") + local file = assert(io.popen(command, "w")) file:write(options.password) file:close() elseif action == "erase" then