gh_env no longer accepts a function
mrjones2014 opened this issue · comments
Issue Description
Type: bug report
Describe what happened (or what feature you want)
The gh_env
option no longer accepts a function; it should accept a table or a function returning a table
Describe what you expected to happen
I can use a function like
{
'pwntester/octo.nvim',
cmd = 'Octo',
opts = {
gh_env = function()
local github_token = require('op').get_secret('GitHub', 'token')
if not github_token or not vim.startswith(github_token, 'ghp_') then
error('Failed to get GitHub token.')
end
return { GITHUB_TOKEN = github_token }
end,
},
}
How to reproduce it (as minimally and precisely as possible)
- Use the above config for
gh_env
- Try to use
octo.nvim
- Get an error that config is invalid