arnaupv / nvim-devcontainer-cli

MIT License
62 stars 0 forks source link

Root from devcontainer dir #30

Closed erichlf closed 2 months ago

erichlf commented 2 months ago

The main portion of this PR changes from using a git command to find the root of the devcontainer to a pure lua function that searches for the devcontainer closest to the root directory, i.e. /. The toplevel flag determines if we use the closest or furthest up the direcotry tree result.

fixes: #27

erichlf commented 2 months ago

I'll add an option for interactive mode, since that is probably why the pipeline is failing.

erichlf commented 2 months ago

I just realized, that I spent so much time on this that I forgot some details. Let this be a draft for the moment as I need to finish up the portion where ndc knows it is running.

erichlf commented 2 months ago

The up job is failing because the bind mounts don't have the files that they are binding to.

erichlf commented 2 months ago

Okay, it is ready for review.

erichlf commented 2 months ago

The latest failures were very strange. It seemed as though the neovim shipped with Ubuntu 20.04 (neovim 0.4) didn't have os.getenv, but you had this working before, so I am confused by that. Anyway, I updated to 22.04 and then fixed the folder tests to be in line with the newer functions.

arnaupv commented 2 months ago

The latest failures were very strange. It seemed as though the neovim shipped with Ubuntu 20.04 (neovim 0.4) didn't have os.getenv, but you had this working before, so I am confused by that. Anyway, I updated to 22.04 and then fixed the folder tests to be in line with the newer functions.

This might be releated to installing nvim in the devcontainer instead of installing using the setup-environment command.