PedramNavid / dbtpal

Neovim plugin for dbt
103 stars 10 forks source link

`oil://` gets prepended to project-dir when oil.nvim is installed. #32

Open MiConnell opened 1 month ago

MiConnell commented 1 month ago

running any dbtpal commands with oil.nvim installed results in the error in the screenshot below

image

updating this line to the below fixes the error but I'm sure hardcoding this is not the best solution and I can't say that I'm too familiar with vim's backend. Happy to try and work on this if needed though!

if options.path_to_dbt_project ~= "" then
-     options.path_to_dbt_project = vim.fn.expand(options.path_to_dbt_project)
+     local expanded_path = vim.fn.expand(options.path_to_dbt_project)
+     if expanded_path:match("^oil:///") then
+         expanded_path = expanded_path:gsub("^oil:///", "")
+     end
+     options.path_to_dbt_project = expanded_path
end

dbtpal v0.0.6 neovim v0.10.1 dbt 1.7.8 macos 14.6.1

PedramNavid commented 1 month ago

I’ve not used oil so I can’t really comment on what might be causing this unfortunately