Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lua/gitlab/job.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ local M = {}
M.run_job = function(endpoint, method, body, callback, on_error_callback)
local state = require("gitlab.state")
local port = state.settings.server and state.settings.server.port
local args = { "-s", "-X", (method or "POST"), string.format("localhost:%s%s", port, endpoint) }
local args =
{ "--noproxy", "localhost", "-s", "-X", (method or "POST"), string.format("localhost:%s%s", port, endpoint) }

if body ~= nil then
local encoded_body = vim.json.encode(body)
Expand Down
3 changes: 2 additions & 1 deletion lua/gitlab/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ M.get_version = function(callback)
local version_output = vim.system({ "git", "describe", "--tags", "--always" }, { cwd = parent_dir }):wait()
local plugin_version = version_output.code == 0 and vim.trim(version_output.stdout) or "unknown"

local args = { "-s", "-X", "GET", string.format("localhost:%s/version", state.settings.server.port) }
local args =
{ "--noproxy", "localhost", "-s", "-X", "GET", string.format("localhost:%s/version", state.settings.server.port) }

-- We call the "/version" endpoint here instead of through the regular jobs pattern because earlier versions of the plugin
-- may not have it. We handle a 404 as an "unknown" version error.
Expand Down
Loading