From 44fc0da969f22de505f2cc293a08ab979e079890 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 17 Jul 2018 16:12:10 -0300 Subject: cfg: detect Visual Studio Developer Console --- src/luarocks/core/cfg.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index de8a93bf..cfbbd144 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua @@ -583,7 +583,14 @@ function cfg.init(lua_data, project_dir, warning) local system = hardcoded.SYSTEM local processor = hardcoded.PROCESSOR if is_windows then - system = system or "Windows" + if not system then + if os.getenv("VCINSTALLDIR") then + -- running from the Development Command prompt for VS 2017 + system = "Windows" + else + system = "MINGW" + end + end if not processor then local pe_parser = require("luarocks.fs.win32.pe-parser") local err -- cgit v1.2.3-55-g6feb