Skip to content

Conversation

justicenyaga
Copy link

This PR addresses an issue encountered on Windows where plenary fails to execute .bat or .cmd executables. On Windows, these file types require the use of cmd /C or powershell -Command to be executed correctly, but plenary was not accounting for this.

Error Message:

Error executing vim.schedule lua callback: ...ta/Local/nvim-data/lazy/plenary.nvim/lua/plenary/job.lua:406: Failed to spawn process: {
  _additional_on_exit_callbacks = { <function 1>, <function 2> },
  _shutdown_check = <userdata 1>,
  _stderr_results = {},
  _stdout_results = {},
  args = { "pub", "add", "crypto" },
  command = "flutter",
  enable_handlers = true,
  enable_recording = true,
  interactive = true,
  pid = "ENOENT: no such file or directory",
}

Fix

To address this, I modified the execution of commands on Windows to use cmd /C. This ensures that .bat and .cmd files are executed correctly, resolving the issue.

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 this pull request may close these issues.

1 participant