diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2019-08-28 13:45:11 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2019-08-28 13:45:11 -0300 |
| commit | a2a3d1595c628111fcbcac8571a7513a8b15e405 (patch) | |
| tree | f90810aa793d429e9bba2b484a8ca80dd7217754 | |
| parent | 91ecea77c6e01e5bf3e0a15ea2146c0a0dbcd573 (diff) | |
| download | luarocks-a2a3d1595c628111fcbcac8571a7513a8b15e405.tar.gz luarocks-a2a3d1595c628111fcbcac8571a7513a8b15e405.tar.bz2 luarocks-a2a3d1595c628111fcbcac8571a7513a8b15e405.zip | |
cmd: move cross-compilation hack to the right place
| -rw-r--r-- | src/luarocks/cmd.lua | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua index f424f488..a1ec1c14 100644 --- a/src/luarocks/cmd.lua +++ b/src/luarocks/cmd.lua | |||
| @@ -282,19 +282,6 @@ do | |||
| 282 | init_config = function(args) | 282 | init_config = function(args) |
| 283 | local detected = detect_config_via_args(args) | 283 | local detected = detect_config_via_args(args) |
| 284 | 284 | ||
| 285 | -- FIXME A quick hack for the experimental Windows build | ||
| 286 | if os.getenv("LUAROCKS_CROSS_COMPILING") then | ||
| 287 | cfg.each_platform = function() | ||
| 288 | local i = 0 | ||
| 289 | local plats = { "unix", "linux" } | ||
| 290 | return function() | ||
| 291 | i = i + 1 | ||
| 292 | return plats[i] | ||
| 293 | end | ||
| 294 | end | ||
| 295 | fs.init() | ||
| 296 | end | ||
| 297 | |||
| 298 | local ok, err = cfg.init(detected, util.warning) | 285 | local ok, err = cfg.init(detected, util.warning) |
| 299 | if not ok then | 286 | if not ok then |
| 300 | return nil, err | 287 | return nil, err |
| @@ -445,6 +432,18 @@ function cmd.run_command(description, commands, external_namespace, ...) | |||
| 445 | 432 | ||
| 446 | check_popen() | 433 | check_popen() |
| 447 | 434 | ||
| 435 | -- FIXME A quick hack for the experimental Windows build | ||
| 436 | if os.getenv("LUAROCKS_CROSS_COMPILING") then | ||
| 437 | cfg.each_platform = function() | ||
| 438 | local i = 0 | ||
| 439 | local plats = { "unix", "linux" } | ||
| 440 | return function() | ||
| 441 | i = i + 1 | ||
| 442 | return plats[i] | ||
| 443 | end | ||
| 444 | end | ||
| 445 | end | ||
| 446 | |||
| 448 | fs.init() | 447 | fs.init() |
| 449 | 448 | ||
| 450 | for _, module_name in ipairs(fs.modules(external_namespace)) do | 449 | for _, module_name in ipairs(fs.modules(external_namespace)) do |
