Skip to content

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

Description

@MiConnell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions