diff options
Diffstat (limited to 'lib')
| -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); |
