handle missing libgdiplus#592
Merged
adamsitnik merged 2 commits intodotnet:masterfrom Jun 27, 2019
Merged
Conversation
Contributor
I suspect this is likely to cause people to miss / ignore it. Why not just fail the run and let them fix it? I think the major value is to point out how to fix the problem trivially. |
billwert
reviewed
Jun 27, 2019
| catch (Exception) when (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) | ||
| { | ||
| Console.ForegroundColor = ConsoleColor.Red; | ||
| Console.WriteLine("libgdiplus is missing, you can install it by running 'apt-get install libgdiplus'"); |
Contributor
There was a problem hiding this comment.
is it worth it to call out sudo here?
There was a problem hiding this comment.
I do not think so, the user might be already sudo or have permissions.
|
I agree with Bill here. It's better to fail and let people fix it. A warning will be easily ignored. |
Member
Author
|
I have pushed a change, now the exception is re-thrown. |
billwert
approved these changes
Jun 27, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of today, when we try to run the benchmarks on a Linux machine without
libgdiplusinstalled the benchmark app crashes and does not run any benchmark.An example from #517 :
My proposal is to handle the exception, print a red warning with explanation (and a solution) and let the other benchmarks run.