Skip to content

Commit

Permalink
Fix for cordova projects located in paths with spaces or other specia…
Browse files Browse the repository at this point in the history
…l characters
  • Loading branch information
Jeroen Sanders authored and akofman committed Mar 30, 2018
1 parent 4fbf29d commit b769831
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,13 @@ const getPlatformVersionsFromFileSystem = (context, projectRoot) => {
const platformsOnFs = cordovaUtil.listPlatforms(projectRoot);
const platformVersions = platformsOnFs.map((platform) => {
const script = path.join(projectRoot, 'platforms', platform, 'cordova', 'version');
return Q.ninvoke(childProcess, 'exec', script, {}).then((result) => {
return Q.ninvoke(childProcess, 'exec', '"' + script + '"', {}).then((result) => {
const version = result[0];
const versionCleaned = version.replace(/\r?\n|\r/g, '');
return {platform: platform, version: versionCleaned};
}, (error) => {
console.log(error);
process.exit(1);
});
});

Expand Down

0 comments on commit b769831

Please sign in to comment.