mac下执行 appium-doctor 出现 “Could not detect Mac OS X Version from sw_vers output: '10.12 '” 解决方法
You can config file by this command:
- grep -rl "Could not detect Mac OS X Version from sw_vers output:" /Applications/Appium.app/
Terminal will show : /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/build/lib/system.js /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/lib/system.js /Applications/Appium.app//Contents/Resources/node_modules/appium-support/build/lib/system.js /Applications/Appium.app//Contents/Resources/node_modules/appium-support/lib/system.js
Use command vim and config each file.
Example
vim /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/build/lib/system.js
Config file:
Change From ->
case 10: _arr = ['10.8', '10.9', '10.10', '10.11']; _i = 0;
To ->
case 10: _arr = ['10.8', '10.9', '10.10', '10.11','10.12']; _i = 0;
vim /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/lib/system.js
Config file:
Change From ->
try { stdout = (await exec('sw_vers', ['-productVersion'])).stdout; }
To ->
try { stdout = (await exec('sw_vers', ['-productVersion'])).stdout.trim(); }
Change From ->
for (let v of ['10.8', '10.9', '10.10', '10.11']) { if (stdout.indexOf(v) === 0) { return v; } }
To ->
for (let v of ['10.8', '10.9', '10.10', '10.11','10.12']) { if (stdout.indexOf(v) === 0) { return v; } }
vim /Applications/Appium.app//Contents/Resources/node_modules/appium-support/build/lib/system.js
Config file:
Change From ->
case 10: _arr = ['10.8', '10.9', '10.10', '10.11']; _i = 0;
To ->
case 10: _arr = ['10.8', '10.9', '10.10', '10.11','10.12']; _i = 0;
vim /Applications/Appium.app//Contents/Resources/node_modules/appium-support/lib/system.js
Config file:
Change From ->
try { stdout = (await exec('sw_vers', ['-productVersion'])).stdout; }
To ->
try { stdout = (await exec('sw_vers', ['-productVersion'])).stdout.trim(); }
Change From ->
for (let v of ['10.8', '10.9', '10.10', '10.11']) { if (stdout.indexOf(v) === 0) { return v; } }
To ->
for (let v of ['10.8', '10.9', '10.10', '10.11','10.12']) { if (stdout.indexOf(v) === 0) { return v; } }
Click start the stethoscope button
最新文章
- Linux的IO性能监控
- Oracle数据库的备份方法
- Android WebView 向上向下滑动监听
- 查看静态库(.a文件)内容
- (字符串的处理4.7.16)POJ 1159 Palindrome(让一个字符串变成回文串需要插入多少个字符...先逆序,在减去公共子序列的最大长度即可)
- 转载IEnumerable与IEnumerator区别
- PLSQL显示乱码-无法进行中文条件查询解决
- live 写博
- MapReduce——计算温度最大值 (基于全新2.2.0API)
- POJ 2777 线段树基础题
- linux找回密码
- Flex中单选按钮控制表格中的列的增加或减少
- 调用get_str_time(时间), 就能把毫秒的时间转换成格式化的 ,转化时间戳的方法
- JVM调优总结 -Xms -Xmx -Xmn -Xss(转)
- 17、python对内存的使用
- javascript 面向对象之路.2 - 小蜜蜂
- numa.h:No such file or directory 解决方法
- 学习笔记之Anaconda / PyCharm
- 2018.10.27 bzoj3209: 花神的数论题(数位dp)
- Java技术专题之JVM逻辑内存回收机制研究图解版
热门文章
- 使用ntpdate工具校正linux服务器时间
- UVa 10655 n次方之和(矩阵快速幂)
- Java网络编程学习A轮_07_基于Buffer的Socket编程
- 动态规划-House Robber
- Leetcode 33
- 235.236. Lowest Common Ancestor of a Binary (Search) Tree -- 最近公共祖先
- Thinking in Java之衍生类和基础类的初始化顺序
- 中兴u880e精简教程
- day02Java基础学习笔记
- linux centos 虚拟机新安装后没有网络