sailorproject / sailor

A Lua MVC Web Framework.
MIT License
926 stars 123 forks source link

Installing sailor multiple times / updating will cause app files to be duplicated #138

Closed Etiene closed 8 years ago

Etiene commented 8 years ago

When installing sailor if you have sailor already installed, some files inside the src/sailor/blank-app will be duplicated because LuaRocks does not remove them previously to installing a new version of sailor. Example:

.htaccess
.htaccess~
.htaccess~~
.htaccess~~~

How to reproduce: Go to /rockspecs/ then luarocks install <rockspec file name> with two different versions of sailor

Etiene commented 8 years ago

@hishamhm help? :)

mpeterv commented 8 years ago

On a fresh installation of Lua 5.2 and Luarocks 2.4.1 in directory t after installing sailor 0.5-3:

Installing sailor 0.5-4 prints Warning: /home/mpeterv/sailor/t/share/lua/5.2/sailor/blank-app/.htaccess is not tracked by this installation of LuaRocks. Moving it to /home/mpeterv/sailor/t/share/lua/5.2/sailor/blank-app/.htaccess~ plus similar errors for other files mentioned in the rockspec in install.lua table.

After installing sailor 0.5-4:

Looks like a bug in Luarocks =(

hishamhm commented 8 years ago

@mpeterv Thank you for hunting it down! I'm wondering how could we write a test to catch that and avoid a regression.

Etiene commented 8 years ago

@mpeterv oh, this is awesome! I'll consider this fixed then. Will be ok on future luarocks versions :)