diff options
| author | Peter Bacon Darwin | 2014-03-12 19:22:32 +0000 |
|---|---|---|
| committer | Tobias Bosch | 2014-03-12 17:33:41 -0700 |
| commit | f3444d495dc82e5a5877db34ebdbd9a0bbcc2067 (patch) | |
| tree | 2f03ba1fb63a8c044fbc3340c229b76d47bdf7a2 | |
| parent | 612c882b839c029e4a4632c45ecc9b2e2f4d45d4 (diff) | |
| download | angular.js-f3444d495dc82e5a5877db34ebdbd9a0bbcc2067.tar.bz2 | |
chore(version-info): better error msg if not tags
| -rw-r--r-- | lib/versions/version-info.js | 6 |
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); |
