Open traysh opened 6 months ago
I get Config api_key_cmd did not return a value when executed when using the following config:
Config api_key_cmd did not return a value when executed
require("chatgpt").setup({ api_key_cmd = "/usr/bin/secret-tool lookup Path 'OpenAI API Key - chatGPT.nvim'" })
But looking up a key that doesn't contain spaces works:
require("chatgpt").setup({ api_key_cmd = "/usr/bin/secret-tool lookup Uuid 112c0e39f57244d4b25fed63c68b7c65" })
Please note the 2 commands above lookup the same entry and both work on the terminal. Therefore, parsing api_key_cmd does not work when arguments contain spaces, such as 'OpenAI API Key - chatGPT.nvim'. The problem probably lies in this function.
api_key_cmd
'OpenAI API Key - chatGPT.nvim'
I get
Config api_key_cmd did not return a value when executed
when using the following config:But looking up a key that doesn't contain spaces works:
Please note the 2 commands above lookup the same entry and both work on the terminal. Therefore, parsing
api_key_cmd
does not work when arguments contain spaces, such as'OpenAI API Key - chatGPT.nvim'
. The problem probably lies in this function.