Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: pcall causing terminals to rapidly open/close #513

Closed
MeguminSama opened this issue Aug 23, 2024 · 1 comment · Fixed by #514
Closed

Windows: pcall causing terminals to rapidly open/close #513

MeguminSama opened this issue Aug 23, 2024 · 1 comment · Fixed by #514

Comments

@MeguminSama
Copy link
Contributor

I just installed rocks for the first time. Windows 11, using Windows Terminal (both PowerShell 7.4.5 & Command Prompt).

When I open nvim with rocks enabled, it causes new terminal windows to appear and disappear rapidly, making it impossible to work or even type :q.

After some debugging, it seems it is caused by setting opts.detach = true in the pcall in luarocks.lua. After setting this to false, the terminals stopped flashing.

Since it seems this was intentional (Prevent luarocks from exiting uncleanly), perhaps there's an alternative way to get a similar effect, without causing new terminal windows to open and close?

log.info(luarocks_cmd)
opts.detach = true -- Prevent luarocks from exiting uncleanly
local ok, err = pcall(vim.system, luarocks_cmd, opts, on_exit_wrapped)

@mrcjkb
Copy link
Member

mrcjkb commented Aug 24, 2024

Hey 👋

Thanks for the detailed report and debugging. 🙏

I think the only thing we can do here is to set it to false on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants