diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-21 03:30:08 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-21 04:19:26 -0300 |
| commit | 28265438538f8298fdaa7a6e74f4ea3a40fb11a5 (patch) | |
| tree | 333801e1da7ca5d087b1880586f7ab5573a176b5 /src | |
| parent | cbd4563612993628ecae9516374c13fab2d2ea29 (diff) | |
| download | luarocks-28265438538f8298fdaa7a6e74f4ea3a40fb11a5.tar.gz luarocks-28265438538f8298fdaa7a6e74f4ea3a40fb11a5.tar.bz2 luarocks-28265438538f8298fdaa7a6e74f4ea3a40fb11a5.zip | |
fix(init): do not write spurious .gitignore entries
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/cmd/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/cmd/init.lua b/src/luarocks/cmd/init.lua index fabd92a1..1783750c 100644 --- a/src/luarocks/cmd/init.lua +++ b/src/luarocks/cmd/init.lua | |||
| @@ -30,9 +30,9 @@ local function gitignore_path(pwd, wrapper_dir, filename) | |||
| 30 | local norm_cur = dir.normalize(fs.absolute_name(pwd)) | 30 | local norm_cur = dir.normalize(fs.absolute_name(pwd)) |
| 31 | local norm_file = dir.normalize(fs.absolute_name(dir.path(wrapper_dir, filename))) | 31 | local norm_file = dir.normalize(fs.absolute_name(dir.path(wrapper_dir, filename))) |
| 32 | if norm_file:sub(1, #norm_cur) == norm_cur then | 32 | if norm_file:sub(1, #norm_cur) == norm_cur then |
| 33 | return norm_file:sub(#norm_cur) | 33 | return norm_file:sub(#norm_cur + 2) |
| 34 | else | 34 | else |
| 35 | return "/" .. filename | 35 | return filename |
| 36 | end | 36 | end |
| 37 | end | 37 | end |
| 38 | 38 | ||
