changes
This commit is contained in:
@@ -80,6 +80,8 @@ local function ensure_token_file()
|
||||
local token_file = config.values.config_file
|
||||
local token_data = read_token_file(token_file)
|
||||
if token_data and token_data ~= "" then
|
||||
-- Trim leading/trailing whitespace/newlines so we don't send a trailing "\n"
|
||||
token_data = token_data:gsub("^%s+", ""):gsub("%s+$", "")
|
||||
token_cached = token_data
|
||||
return
|
||||
end
|
||||
@@ -106,4 +108,4 @@ function M.get_token()
|
||||
return token_cached
|
||||
end
|
||||
|
||||
return M
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user