Shatur / neovim-cmake

CMake integration for Neovim
GNU General Public License v3.0
87 stars 19 forks source link

"CMake configure" raises error on windows #13

Closed spindensity closed 3 years ago

spindensity commented 3 years ago

Bug description Execute :CMake configure, an error is raised:

Snipaste_2021-10-13_22-29-32

Steps to reproduce

  1. Open any fresh cmake project without build directory on windows with neovim;
  2. Execute :CMake configure.

Expected behavior

No errors occur.

Actual behavior

An error is raised:

Snipaste_2021-10-13_22-29-32

Additional context

mkdir function in plenary.nvim splits path with plenary.path.path.sep to determine the parent directories, the value of plenary.path.path.sep is \ on windows. neovim-cmake hardcode the path separator as /, so mkdir fails to determine the parent parts of the path, and raises the error.

Shatur commented 3 years ago

@spindensity Could you check if #14 fixes the issue for you?

spindensity commented 3 years ago

No, the following code segments need to be changed also:

https://github.com/Shatur/neovim-cmake/blob/a41dafdc64e5995963fdbc04ce329d8cd200e2eb/lua/cmake/utils.lua#L36-L38

https://github.com/Shatur/neovim-cmake/blob/a41dafdc64e5995963fdbc04ce329d8cd200e2eb/lua/cmake/utils.lua#L52-L56

Shatur commented 3 years ago

@spindensity Nice catch, fixed. Could you check it again?

spindensity commented 3 years ago

I can confirm 2cfda5e3250088e1fac7ced4f33a9e2d67620b02 fixed the problem.

Thanks.

Shatur commented 3 years ago

Thank you!

Shatur commented 3 years ago

Closed by #14.