Updated Branches: refs/heads/master2 f53f6ea32 -> a79d2aa08
2.8.21. ".svn" folders should not be counted as plugins. Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/a79d2aa0 Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/a79d2aa0 Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/a79d2aa0 Branch: refs/heads/master2 Commit: a79d2aa08425971a724a24519eb0095e284ff804 Parents: f53f6ea Author: Fil Maj <[email protected]> Authored: Tue Jun 18 15:24:28 2013 -0700 Committer: Fil Maj <[email protected]> Committed: Tue Jun 18 15:24:28 2013 -0700 ---------------------------------------------------------------------- package.json | 2 +- spec/util.spec.js | 12 ++++++++++++ src/util.js | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/a79d2aa0/package.json ---------------------------------------------------------------------- diff --git a/package.json b/package.json index 47a4b10..3760796 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova", - "version": "2.8.20", + "version": "2.8.21", "preferGlobal": "true", "description": "Cordova command line interface tool", "main": "cordova", http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/a79d2aa0/spec/util.spec.js ---------------------------------------------------------------------- diff --git a/spec/util.spec.js b/spec/util.spec.js index 6b52d03..f5dbe36 100644 --- a/spec/util.spec.js +++ b/spec/util.spec.js @@ -86,5 +86,17 @@ describe('util module', function() { var res = util.findPlugins(plugins); expect(res.length).toEqual(4); }); + it('should not return ".svn" directories', function() { + var plugins = path.join(temp, 'plugins'); + var android = path.join(plugins, 'android'); + var ios = path.join(plugins, 'ios'); + var svn = path.join(plugins, '.svn'); + shell.mkdir('-p', android); + shell.mkdir('-p', ios); + shell.mkdir('-p', svn); + var res = util.findPlugins(plugins); + expect(res.length).toEqual(2); + expect(res.indexOf('.svn')).toEqual(-1); + }); }); }); http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/a79d2aa0/src/util.js ---------------------------------------------------------------------- diff --git a/src/util.js b/src/util.js index e0ae3f8..e860776 100644 --- a/src/util.js +++ b/src/util.js @@ -79,7 +79,7 @@ module.exports = { if (fs.existsSync(pluginPath)) { plugins = fs.readdirSync(pluginPath).filter(function (fileName) { stats = fs.statSync(path.join(pluginPath, fileName)); - return stats.isDirectory(); + return fileName != '.svn' && stats.isDirectory(); }); }
