rhysd / wdio-appium-service

No longer need to launch Appium manually for Webdriver.io
MIT License
9 stars 8 forks source link

_detectAppiumCommand rejects node_modules/.bin/appium when it's a symbolic link #7

Open jeremypenner opened 6 years ago

jeremypenner commented 6 years ago

My project has appium 1.6.5 installed as a dev dependency, but wdio-appium-service tries to launch a globally-installed appium. Narrowed the problem down to this line of code:

https://github.com/rhysd/wdio-appium-service/blob/master/lib/launcher.js#L111

fs.statSync(cmd).isFile() would be more appropriate, as fs.lstatSync(cmd).isFile() returns false for symbolic links to files.