cordova-xml icon indicating copy to clipboard operation
cordova-xml copied to clipboard

🆘 No check if `config.xml` not exist in path

Open WuglyakBolgoink opened this issue 8 years ago • 3 comments

⚠️ const file = inFile || defaultFile;

  • OK ✅
var cordovaXML = require('cordova-xml')('/Users/xyz/dev/workspaces/tmp/myApp/config.xml');
  • need Exception ☠️
var cordovaXML = require('cordova-xml')('/Users/xyz/dev/workspaces/tmp/myApp/');

WuglyakBolgoink avatar Mar 07 '17 15:03 WuglyakBolgoink

Why do you need exception?

mifi avatar Mar 07 '17 16:03 mifi

hallo @mifi

if

  • I forgot to create config.xml
  • in bad timing this file was not created correctly, plugin return SUCCESS
  • in folder (from path) config.xml not exist (ex. my Path can be: 'foo/bar')

WuglyakBolgoink avatar Mar 07 '17 18:03 WuglyakBolgoink

If you do a require('cordova-xml')('/Users/xyz/dev/workspaces/tmp/myApp/').setId('com.example.myid') then does it not fail?

mifi avatar Mar 08 '17 14:03 mifi