Unverified Commit 1d59196b authored by Sumit Bikram Maity's avatar Sumit Bikram Maity Committed by GitHub

Appended period remove & Uri parsing fix. (#131293)

Fixed code for the Uri as it includes the period at the end as the part of Uri parsing previously.

As for example:
```
A crash report has been written to /Users/andrewkolos/Desktop/asset_transformers_test/flutter_03.log.
``` 

Many terminals are unable to follow the link because it includes the period in the end as part of it. This PR simply removes the period in the end so that it is clickable in many systems (e.g. by `alt` -clicking on it in an embedded bash terminal, VSCode).

```
A crash report has been written to /Users/andrewkolos/Desktop/asset_transformers_test/flutter_03.log
``` 

Fixes:  #131166
parent efc9e16e
...@@ -69,7 +69,7 @@ class CrashReporter { ...@@ -69,7 +69,7 @@ class CrashReporter {
/// Prints instructions for filing a bug about the crash. /// Prints instructions for filing a bug about the crash.
Future<void> informUser(CrashDetails details, File crashFile) async { Future<void> informUser(CrashDetails details, File crashFile) async {
_logger.printError('A crash report has been written to ${crashFile.path}.'); _logger.printError('A crash report has been written to ${crashFile.path}');
_logger.printStatus('This crash may already be reported. Check GitHub for similar crashes.', emphasis: true); _logger.printStatus('This crash may already be reported. Check GitHub for similar crashes.', emphasis: true);
final String similarIssuesURL = GitHubTemplateCreator.toolCrashSimilarIssuesURL(details.error.toString()); final String similarIssuesURL = GitHubTemplateCreator.toolCrashSimilarIssuesURL(details.error.toString());
......
...@@ -100,7 +100,7 @@ void main() { ...@@ -100,7 +100,7 @@ void main() {
expect(logger.statusText, contains('NoPIIFakeDoctorText')); expect(logger.statusText, contains('NoPIIFakeDoctorText'));
expect(logger.statusText, isNot(contains('Ignored'))); expect(logger.statusText, isNot(contains('Ignored')));
expect(logger.statusText, contains('https://github.com/flutter/flutter/issues/new')); expect(logger.statusText, contains('https://github.com/flutter/flutter/issues/new'));
expect(logger.errorText, contains('A crash report has been written to ${file.path}.')); expect(logger.errorText.trim(), 'A crash report has been written to ${file.path}');
}); });
testWithoutContext('suppress analytics', () async { testWithoutContext('suppress analytics', () async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment