windowslib.visualstudio.detect
failed to detect Visual Studio 2015, when it is installed to the path which contains space.
PS > npm run-script test-visualstudio
> windowslib@0.1.15 test-visualstudio windowslib
> mocha --require test/init --reporter spec --check-leaks test/test-visualstudio
visualstudio
√ namespace should be an object
1) detect should find Visual Studio installations
1 passing (500ms)
1 failing
1) visualstudio detect should find Visual Studio installations:
Uncaught AssertionError: expected null to be a string
at Assertion.fail (windowslib\node_modules\should\lib\assertion.js:113:17)
at Assertion.prop.(anonymous function) [as String] (windowslib\node_modules\should\lib\ass
ertion.js:39:14)
at checkVisualStudio (windowslib\test\test-visualstudio.js:73:42)
at windowslib\test\test-visualstudio.js:34:4
at finalize (windowslib\lib\visualstudio.js:64:4)
at windowslib\lib\visualstudio.js:218:5
at done (windowslib\node_modules\async\lib\async.js:132:19)
at windowslib\node_modules\async\lib\async.js:32:16
at windowslib\lib\visualstudio.js:187:10
at ChildProcess.<anonymous> (windowslib\node_modules\node-appc\lib\subprocess.js:60:3)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
It is because some spaces in
vcvarsall
variable is not properly escaped.
output from console.log(vcvarsall);
C:\PROGRA~2\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
I was able to fix it locally, here's a PR:
https://github.com/appcelerator/windowslib/pull/22
https://github.com/appcelerator/windowslib/pull/22
Verified using: Windows 10 Pro Appc Core: 5.1.0-42 Appc NPM: 4.2.1 Ti SDK: 5.1.0.v2015102819002 When running
appc ti info
Visual Studio 2015 is detected and when running the Visual Studio tests in windowslib they now pass Closing ticketwindowslib: https://github.com/appcelerator/windowslib/pull/35 titanium_mobile: https://github.com/appcelerator/titanium_mobile/pull/7918 titanium_mobile_5_3_X: https://github.com/appcelerator/titanium_mobile/pull/7919
Verified as fixed, running
appc ti info
Visual Studio 2015 is detected. Additionally experienced in issue with MSBuild detection when Visual Studio was installed on a secondary drive, but this issue has now been addressed. Tested on: Windows 10 Home & Pro Appc Studio: 4.6.0.201604141457 Ti SDK: 5.3.0.v20160414094426 Appc NPM: 4.2.5-1 Appc Core: 5.3.0-12 Node: v4.4.2 *Closing Ticket.*