Skip to content

Commit

Permalink
fix: nil scopes match
Browse files Browse the repository at this point in the history
Fixes #480

This makes sure we have some scope string, even if the parsed output is
nil.
  • Loading branch information
milogert committed Jan 17, 2024
1 parent 613d73a commit 98ce102
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/octo/gh/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function M.setup()
env = get_env(),
on_exit = vim.schedule_wrap(function(j_self, _, _)
local stdout = table.concat(j_self:result(), "\n")
local all_scopes = string.match(stdout, " Token scopes: (.*)")
local all_scopes = string.match(stdout, " Token scopes: (.*)") or ""
local split = vim.split(all_scopes, ", ")
for idx, split_scope in ipairs(split) do
scopes[idx] = string.gsub(split_scope, "'", "")
Expand Down

0 comments on commit 98ce102

Please sign in to comment.