Skip to content

Commit

Permalink
trim last path element
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Sep 16, 2023
1 parent 4224367 commit 6926a46
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion dist/main.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/sig.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Future<String> findLatestSdkForRelease(String sdkRelease) async {

final paths = (getProperty(result, 'prefixes') as List).cast<String>();
print(paths);
final versions = paths.map((p) => p.split('/').last).toList();
final versions = paths.map((p) => (p.split('/')..removeLast()).last).toList();
print(versions);

// Sort versions by semver and return the highest version.
Expand Down

0 comments on commit 6926a46

Please sign in to comment.