dbtpal icon indicating copy to clipboard operation
dbtpal copied to clipboard

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

Open MiConnell opened this issue 1 year ago • 1 comments

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

MiConnell avatar Sep 03 '24 05:09 MiConnell

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

PedramNavid avatar Sep 03 '24 06:09 PedramNavid