aboutsummaryrefslogtreecommitdiffstats
path: root/lib/versions/version-info.js
diff options
context:
space:
mode:
authorPeter Bacon Darwin2014-03-12 19:22:32 +0000
committerPeter Bacon Darwin2014-03-12 19:22:32 +0000
commitedad4e63dff0ca0b19a264fc17e8b6a5315dfb04 (patch)
tree641f40e0e158f0ff974c608509572fed5f09d081 /lib/versions/version-info.js
parentf684cb09a56d44c0814eda7e1613ecf4d2c5da15 (diff)
downloadangular.js-edad4e63dff0ca0b19a264fc17e8b6a5315dfb04.tar.bz2
chore(version-info): better error msg if not tags
Diffstat (limited to 'lib/versions/version-info.js')
-rw-r--r--lib/versions/version-info.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/versions/version-info.js b/lib/versions/version-info.js
index 588f1865..90175fc9 100644
--- a/lib/versions/version-info.js
+++ b/lib/versions/version-info.js
@@ -136,6 +136,12 @@ var getSnapshotVersion = function() {
})
.last();
+ if ( !version ) {
+ throw new Error("No valid versions can be found that match the current branch (" +
+ currentPackage.branchVersion + ").\n" +
+ "Try running `git fetch -t` to download the tags from the repository.");
+ }
+
// We need to clone to ensure that we are not modifying another version
version = semver(version.raw);