mirror of
https://github.com/appium/appium.git
synced 2026-02-14 05:50:00 -06:00
Use plist.parse instead of plist.parseFileSync.
When running Appium, I got a warning / error stating that:
`parseFileSync()` is deprecated. Use `parseStringSync()` instead.
and my task was halted.
Appium uses `"plist": "~1.0.0"` in `package.json`.
`plist` v1.0.0 and up says that `parseFileSync()` is deprecated, and
that it should be replaced with `parseStringSync()`. However,
`parseStringSync()` is *also* deprecated, to be replaced with `parse()`.
This all is based on:
- https://github.com/TooTallNate/plist.js/blob/v1.0.0/lib/node.js#L15
- https://github.com/TooTallNate/plist.js/blob/v1.0.0/lib/parse.js#L16
So I changed the related line in the iOS configuration file to point to
the new method `parse()`. This appears to resolve this error and allows
me to continue.
This commit is contained in:
@@ -33,7 +33,7 @@ var path = require('path')
|
||||
// XML Plist library helper
|
||||
var parseXmlPlistFile = function (plist, cb) {
|
||||
try {
|
||||
var result = xmlplist.parseFileSync(plist);
|
||||
var result = xmlplist.parse(plist);
|
||||
return cb(null, result);
|
||||
} catch (ex) {
|
||||
return cb(ex);
|
||||
|
||||
Reference in New Issue
Block a user