Skip to content

Commit

Permalink
fix bug #60
Browse files Browse the repository at this point in the history
  • Loading branch information
YehudaKremer committed Oct 26, 2021
1 parent ea3a17c commit 59abae4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.5.5

- fix bug "Certificate Details can't be read" - https://github.com/YehudaKremer/msix/issues/60

## 2.5.4

- certificate "publisher" is now recognize automatic
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In your `pubspec.yaml`, add `msix` as a new dependency:
dev_dependencies:
flutter_test:
sdk: flutter
msix: ^2.5.3
msix: ^2.5.5
```
## :package: Create Msix
Expand Down
13 changes: 8 additions & 5 deletions lib/src/cli/signtool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,18 @@ class Signtool {
Log.info('Certificate Details: ${certificateDetails.stdout}');

try {
config.publisher = certificateDetails.stdout
var subjectRow = certificateDetails.stdout
.toString()
.split('\n')
.firstWhere((row) =>
.lastWhere((row) =>
!row.isNullOrEmpty &&
row.toLowerCase().trim().startsWith('subject:'))
.replaceFirst('Subject:', '')
.replaceFirst('subject:', '')
(row.toLowerCase().contains('cn =') ||
row.toLowerCase().contains('cn=')));
Log.info('subjectRow: $subjectRow');
config.publisher = subjectRow
.substring(subjectRow.indexOf(':') + 1, subjectRow.length)
.trim();
Log.info('config.publisher: ${config.publisher}');
} catch (err, stackTrace) {
Log.error(err.toString());
Log.errorAndExit(stackTrace.toString());
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: msix
description: A command-line tool that create Msix installer from your flutter windows-build files.
version: 2.5.4
version: 2.5.5
maintainer: Yehuda Kremer (yehudakremer@gmail.com)
homepage: https://github.com/YehudaKremer/msix

Expand Down

0 comments on commit 59abae4

Please sign in to comment.