File tree 1 file changed +3
-4
lines changed 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -226,21 +226,20 @@ class Package extends LibraryContainer
226
226
case 'b' :
227
227
{
228
228
Version version = Version .parse (packageMeta.version);
229
+ String tag = 'stable' ;
229
230
if (version.isPreRelease) {
230
231
// version.preRelease is a List<dynamic> with a mix of
231
232
// integers and strings. Given this, handle
232
233
// 2.8.0-dev.1.0, 2.9.0-dev.1.0, and similar
233
234
// variations.
234
- String tag = version.preRelease.whereType <String >().first;
235
+ tag = version.preRelease.whereType <String >().first;
235
236
// Who knows about non-SDK packages, but assert that SDKs
236
237
// must conform to the known format.
237
238
assert (
238
239
packageMeta.isSdk == false || int .tryParse (tag) == null ,
239
240
'Got an integer as string instead of the expected "dev" tag' );
240
241
}
241
- return version.isPreRelease
242
- ? version.preRelease.whereType <String >().first
243
- : 'stable' ;
242
+ return tag;
244
243
}
245
244
case 'n' :
246
245
return name;
You can’t perform that action at this time.
0 commit comments