aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Melnichenko <mpeterval@gmail.com>2016-05-22 18:04:42 +0300
committerPeter Melnichenko <mpeterval@gmail.com>2016-05-22 18:04:42 +0300
commit43c1a5925baf3e4003ca4bf070910b6615f5f829 (patch)
treedc0bd9f412a2daa884e091af264d9ef1e7c6c80e
parentbc81a0b8f0bd9f36c0d98ec728ecde864fadd197 (diff)
downloadluarocks-43c1a5925baf3e4003ca4bf070910b6615f5f829.tar.gz
luarocks-43c1a5925baf3e4003ca4bf070910b6615f5f829.tar.bz2
luarocks-43c1a5925baf3e4003ca4bf070910b6615f5f829.zip
Fix behaviour of `luarocks write-rockspec` with two args
It accepts name, version and location. If two are given, the first one is considered the name and the second the location, but the version is also set to the location. Reset it to allow guessing it or using default (scm).
-rw-r--r--src/luarocks/write_rockspec.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/luarocks/write_rockspec.lua b/src/luarocks/write_rockspec.lua
index 972562c3..26a65808 100644
--- a/src/luarocks/write_rockspec.lua
+++ b/src/luarocks/write_rockspec.lua
@@ -208,6 +208,7 @@ function write_rockspec.run(...)
208 name = nil 208 name = nil
209 elseif not url_or_dir then 209 elseif not url_or_dir then
210 url_or_dir = version 210 url_or_dir = version
211 version = nil
211 end 212 end
212 213
213 if flags["tag"] then 214 if flags["tag"] then