Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit edad4e6

Browse files
chore(version-info): better error msg if not tags
1 parent f684cb0 commit edad4e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/versions/version-info.js

+6
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ var getSnapshotVersion = function() {
136136
})
137137
.last();
138138

139+
if ( !version ) {
140+
throw new Error("No valid versions can be found that match the current branch (" +
141+
currentPackage.branchVersion + ").\n" +
142+
"Try running `git fetch -t` to download the tags from the repository.");
143+
}
144+
139145
// We need to clone to ensure that we are not modifying another version
140146
version = semver(version.raw);
141147

0 commit comments

Comments
 (0)