Modified project_id logic to require .gitlab.nvim file
This commit is contained in:
@@ -60,13 +60,14 @@ M.setup = function(args, build_only)
|
||||
|
||||
if build_only then return end
|
||||
|
||||
-- Override project_id in setup call if configuration file is present
|
||||
local config_file_path = vim.fn.getcwd() .. "/.gitlab.nvim"
|
||||
local config_file_content = u.read_file(config_file_path)
|
||||
if config_file_content ~= nil then
|
||||
args.project_id = config_file_content
|
||||
if config_file_content == nil then
|
||||
return
|
||||
end
|
||||
|
||||
args.project_id = config_file_content
|
||||
|
||||
if args.project_id == nil then
|
||||
args.project_id = u.read_file(state.BIN_PATH .. "/.gitlab/project_id")
|
||||
error("No project ID provided!")
|
||||
|
||||
Reference in New Issue
Block a user