luarocks icon indicating copy to clipboard operation
luarocks copied to clipboard

[Windows] Documentation for minor quirky edge case in Windows

Open scorbiclife opened this issue 3 years ago • 0 comments

I think this is a very very minor edge case, but some may benefit from knowing this, so I decided to share.

  • Description:
    • OS: Windows (Windows 11)
    • Luarocks version: 3.8.0 (Single Binary distribution, 64bit)
    • Git Bash and cmd/PowerShell uses different paths for luarocks prefix (for config and installation).
      • On Git Bash it's ~/.luarocks
      • On cmd/Powershell it's %APPDATA%\luarocks
      • By default the two work as independent installations.
    • Important Quirk when trying to merge the two
      • If you keep ~/.luarocks and make %APPDATA%\luarocks a link with mklink /j ... then when launching luarocks in PowerShell it wipes the hard link and makes a new %APPDATA%\luarocks directory.
      • Therefore I personally recommend to keep %APPDATA%\luarocks and use a symbolic link for ~/.luarocks with ln -s ...
    • Other shells may not exhibit this behavior. For instance, busybox sh uses %APPDATA%

scorbiclife avatar Apr 25 '22 02:04 scorbiclife