Updated Branches: refs/heads/master da71266af -> 3e093f720
packager was failing to find license header on windows because of line ending diffs. Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/3e093f72 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/3e093f72 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/3e093f72 Branch: refs/heads/master Commit: 3e093f7201be312b70e2be0b394031c46d9c10fa Parents: da71266 Author: Jesse MacFadyen <purplecabb...@gmail.com> Authored: Fri Oct 5 01:26:55 2012 -0700 Committer: Jesse MacFadyen <purplecabb...@gmail.com> Committed: Fri Oct 5 01:26:55 2012 -0700 ---------------------------------------------------------------------- build/packager.js | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3e093f72/build/packager.js ---------------------------------------------------------------------- diff --git a/build/packager.js b/build/packager.js index 7b8eff0..e956bde 100644 --- a/build/packager.js +++ b/build/packager.js @@ -252,9 +252,11 @@ function copyProps(target, source) { //----------------------------------------------------------------------------- // Strips the license header. Basically only the first multi-line comment up to to the closing */ function stripHeader(contents, fileName) { - var ls = contents.split('\n'); + var ls = contents.split(/\r?\n/); while (ls[0]) { - if (ls[0].match(/^\s*\/\*/) || ls[0].match(/^\s*\*/)) ls.shift(); + if (ls[0].match(/^\s*\/\*/) || ls[0].match(/^\s*\*/)) { + ls.shift(); + } else if (ls[0].match(/^\s*\*\//)) { ls.shift(); break;