-
Notifications
You must be signed in to change notification settings - Fork 14
/
luarocks.patch
20 lines (18 loc) · 954 Bytes
/
luarocks.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua
index 34ae02da5..79a427819 100644
--- a/src/luarocks/manif.lua
+++ b/src/luarocks/manif.lua
@@ -444,11 +444,10 @@ function manif.add_to_manifest(name, version, repo, deps_mode)
local manifest, err = manif_core.load_local_manifest(rocks_dir)
if not manifest then
- util.printerr("No existing manifest. Attempting to rebuild...")
- -- Manifest built by `manif.make_manifest` should already
- -- include information about given name and version,
- -- no need to update it.
- return manif.make_manifest(rocks_dir, deps_mode)
+ util.printerr("No existing manifest. Creating an empty one...")
+ -- Create an empty manifest.
+ manifest, err = { repository = {}, modules = {}, commands = {} }, nil
+ manif_core.cache_manifest(rocks_dir, nil, manifest)
end
local results = {[name] = {[version] = {{arch = "installed", repo = rocks_dir}}}}