Skip to content

Commit

Permalink
fix: fix environment invalid logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rIIh committed Jun 10, 2024
1 parent 8b006f3 commit df2ae9b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions packages/allure_server_cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.2

- Fix environment parse logic

## 1.0.1

- Add `--header` option, supporting multiple values in format `KEY=VALUE`
Expand Down
10 changes: 4 additions & 6 deletions packages/allure_server_cli/bin/allures.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,10 @@ Future<void> main(List<String> arguments) async {
MapEntry<String, String>? getAuthorizationFromEnvironment() {
if (Platform.environment.containsKey('ALLURES_BASIC_AUTH_USER') &&
Platform.environment.containsKey('ALLURES_BASIC_AUTH_PASSWORD')) {
final user = Platform.environment.containsKey(
'ALLURES_BASIC_AUTH_USER',
);
final password = Platform.environment.containsKey(
'ALLURES_BASIC_AUTH_PASSWORD',
);
final user = Platform.environment['ALLURES_BASIC_AUTH_USER'];
final password = Platform.environment['ALLURES_BASIC_AUTH_PASSWORD'];

l.d([user, password]);

return MapEntry(
"Authorization",
Expand Down
4 changes: 3 additions & 1 deletion packages/allure_server_cli/lib/src/report_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ class ReportCommand {
},
);

return ReportResult.fromJson(response.data);
final result = ReportResult.fromJson(response.data);
print("Report available at: ${result.url}");
return result;
} on DioException catch (e, s) {
if (e.response case Response response) {
l.e(
Expand Down
2 changes: 1 addition & 1 deletion packages/allure_server_cli/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: allure_server_cli
description: CLI tool for communication with [Allure Server](https://github.com/kochetkov-ma/allure-server)
version: 1.0.1
version: 1.0.2
repository: https://github.com/rIIh/dart_test_reporter
issue_tracker: https://github.com/rIIh/dart_test_reporter/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+%5Ballure_server_cli%5D

Expand Down

0 comments on commit df2ae9b

Please sign in to comment.