action-setup-vim icon indicating copy to clipboard operation
action-setup-vim copied to clipboard

Install directory should be under `$RUNNER_TEMP` instead of `$HOME`

Open rhysd opened this issue 2 months ago • 0 comments

Currently Vim/Neovim is installed under $HOME (if they are not installed via system package manager). However $HOME is not safe for putting arbitrary directories. They may cause conflicts and the directories are not guaranteed to be cleaned up (especially in self-hosted runner).

GitHub Actions provides $RUNNER_TEMP directory path for this purpose. The temporary directory is guaranteed to be empty at the beginning of the job and be cleaned up at the end of the job.

https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables

action-setup-vim should use the directory. One downside of this change is that the change may break user's current workflow which directly depends on the path without using outputs.executable or outputs.vim-dir. We need to care about it and should take the following path:

  1. Add outputs.install-dir output and recommend users using it. We need to consider how to handle the case where Vim/Neovim is installed via system's package manager
  2. Add notice that 'the default installation directory can change in the future so you should not rely on it'
  3. Change the default installation directory with minor version bump

rhysd avatar Nov 17 '25 04:11 rhysd