[react-native CLI] info command attempts to run xcodebuild on non-macOS environments, prints error
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
(Write your answer here.)
Environment
Environment: OS: Windows 10 Node: 8.1.3 Yarn: 1.2.0 npm: 5.0.3 Watchman: Not Found Error: unable to print environment info { Error: not found: xcodebuild at getNotFoundError (C:\AwesomeProject\node_modules\which\which.js:13:12) at Function.whichSync [as sync] (C:\AwesomeProject\node_modules\which\which.js:134:9) at getXcodeVersion (C:\AwesomeProject\node_modules\envinfo\envinfo.js:17:25) at Object.module.exports.print (C:\AwesomeProject\node_modules\envinfo\envinfo.js:136:28) at Object.info (C:/AwesomeProject/node_modules/react-native/local-cli/info/info.js:17:13) at Promise.resolve.then (C:/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:109:26) at <anonymous> at process._tickCallback (internal/process/next_tick.js:169:7) at Function.Module.runMain (module.js:607:11) at startup (bootstrap_node.js:158:16) code: ‘ENOENT’ }
Steps to Reproduce
On Windows 10 , Run react-native info
Expected Behavior
Print info
Actual Behavior
When I run react-native info
in windows 10, I have this result
Scanning 914 folders for symlinks in C:\AwesomeProject\node_modules (47ms)
Environment:
OS: Windows 10
Node: 8.1.3
Yarn: 1.2.0
npm: 5.0.3
Watchman: Not Found
Error: unable to print environment info
{ Error: not found: xcodebuild
at getNotFoundError (C:\AwesomeProject\node_modules\which\which.js:13:12)
at Function.whichSync [as sync] (C:\AwesomeProject\node_modules\which\which.js:134:9)
at getXcodeVersion (C:\AwesomeProject\node_modules\envinfo\envinfo.js:17:25)
at Object.module.exports.print (C:\AwesomeProject\node_modules\envinfo\envinfo.js:136:28)
at Object.info (C:/AwesomeProject/node_modules/react-native/local-cli/info/info.js:17:13)
at Promise.resolve.then (C:/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:109:26)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
at Function.Module.runMain (module.js:607:11)
at startup (bootstrap_node.js:158:16) code: 'ENOENT' }
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (6 by maintainers)
Just approved it, will make a release momentarily!
Created a PR for that repository. Not sure how it’ll be reviewed though https://github.com/tabrindle/envinfo/pull/4