Skip to content

Commit

Permalink
Merge pull request #131 from adament/windows
Browse files Browse the repository at this point in the history
Minimal windows support
  • Loading branch information
kndndrj committed Jul 24, 2024
2 parents 13039ca + b19425a commit a3e360d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lua/dbee/api/state.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ local function setup_handler()
register()

-- add install binary to path
vim.env.PATH = install.dir() .. ":" .. vim.env.PATH
local pathsep = ":"
if vim.fn.has("win32") then
pathsep = ";"
end
vim.env.PATH = install.dir() .. pathsep .. vim.env.PATH

m.handler = Handler:new(m.config.sources)
m.handler:add_helpers(m.config.extra_helpers)
Expand Down
6 changes: 5 additions & 1 deletion lua/dbee/install/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ end

---@return string _ path to binary
function M.bin()
return M.dir() .. "/dbee"
local suffix = ""
if vim.fn.has("win32") then
suffix = ".exe"
end
return M.dir() .. "/dbee" .. suffix
end

---@return string _ version (hash of install manifest)
Expand Down

0 comments on commit a3e360d

Please sign in to comment.