Skip to content

Commit

Permalink
🐛fix(windows): detached = true causes windows to spawn a cmd window…
Browse files Browse the repository at this point in the history
…, so let's remove this very minor optimization.
  • Loading branch information
Zeioth committed Feb 14, 2024
1 parent 1d4e67e commit 62716d3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
7 changes: 3 additions & 4 deletions lua/dooku/backends/doxygen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function M.generate(is_autocmd)
if job then uv.process_kill(job, 9) end -- Running already? kill it
job = uv.spawn(
"doxygen",
{ args = config.doxygen_args , cwd = doxygen_dir, detach = true }
{ args = config.doxygen_args , cwd = doxygen_dir }
)

-- Open html docs
Expand All @@ -59,8 +59,7 @@ M.open = function()

uv.spawn(config.browser_cmd, {
args = { config.doxygen_html_file },
cwd = cwd,
detach = true,
cwd = cwd
})
end

Expand Down Expand Up @@ -92,7 +91,7 @@ M.auto_setup = function()
.. config.doxygen_clone_to_dir
.. " "
.. config.doxygen_clone_cmd_post,
{ cwd = cwd, detach = true }
{ cwd = cwd }
)
end

Expand Down
5 changes: 2 additions & 3 deletions lua/dooku/backends/godoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function M.generate(is_autocmd)
vim.log.levels.INFO, {title="dooku.nvim"})
end

job = uv.spawn("godoc", { args = config.godoc_args, cwd = cwd, detach = true })
job = uv.spawn("godoc", { args = config.godoc_args, cwd = cwd })
autocmd("VimLeavePre", {
desc = "Stop godoc when exiting vim",
group = augroup("dooku_stop_godoc", { clear = true }),
Expand Down Expand Up @@ -51,8 +51,7 @@ M.open = function()

uv.spawn(config.browser_cmd, {
args = { config.godoc_html_url },
cwd = cwd,
detach = true,
cwd = cwd
})
end

Expand Down
7 changes: 3 additions & 4 deletions lua/dooku/backends/jsdoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function M.generate(is_autocmd)

if job then uv.process_kill(job, 9) end -- Running already? kill it
job = uv.spawn(
"jsdoc", { args = config.jsdoc_args , cwd = cwd, detach = true }
"jsdoc", { args = config.jsdoc_args , cwd = cwd }
)

-- Open html docs
Expand All @@ -57,8 +57,7 @@ M.open = function()

uv.spawn(config.browser_cmd, {
args = { config.jsdoc_html_file },
cwd = cwd,
detach = true,
cwd = cwd
})
end

Expand Down Expand Up @@ -89,7 +88,7 @@ M.auto_setup = function()
.. config.jsdoc_clone_to_dir
.. " "
.. config.jsdoc_clone_cmd_post,
{ cwd = cwd, detach = true }
{ cwd = cwd }
)
end

Expand Down
5 changes: 2 additions & 3 deletions lua/dooku/backends/rustdoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function M.generate(is_autocmd)
if job then uv.process_kill(job, 9) end -- Running already? kill it
job = uv.spawn(
"cargo",
{ args = config.rustdoc_args, cwd = cwd, detach = true }
{ args = config.rustdoc_args, cwd = cwd }
)

-- Open html docs
Expand Down Expand Up @@ -57,8 +57,7 @@ M.open = function()

uv.spawn(config.browser_cmd, {
args = { html_file },
cwd = cwd,
detach = true,
cwd = cwd
})
end

Expand Down
7 changes: 3 additions & 4 deletions lua/dooku/backends/typedoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function M.generate(is_autocmd)

if job then uv.process_kill(job, 9) end -- Running already? kill it
job = uv.spawn(
"typedoc", { args = config.typedoc_args, cwd = cwd, detach = true }
"typedoc", { args = config.typedoc_args, cwd = cwd }
)

-- Open html docs
Expand All @@ -57,8 +57,7 @@ M.open = function()

uv.spawn(config.browser_cmd, {
args = { config.typedoc_html_file },
cwd = cwd,
detach = true,
cwd = cwd
})
end

Expand Down Expand Up @@ -89,7 +88,7 @@ M.auto_setup = function()
.. config.typedoc_clone_to_dir
.. " "
.. config.typedoc_clone_cmd_post,
{ cwd = cwd, detach = true }
{ cwd = cwd }
)
end

Expand Down

0 comments on commit 62716d3

Please sign in to comment.