julia
c4e1772f - Avoid an error when `show`ing a `Platform` with an unrecognized OS

Commit
105 days ago
Avoid an error when `show`ing a `Platform` with an unrecognized OS `platform_name(p)` assumed, without checking, that `os(p)` is among a small set of recognized operating systems. This meant that `show`ing a `Platform` for which `os(p)` is not in that set caused an error, as `show(::IO, ::MIME{Symbol("text/plain")}, ::AbstractPlatform)` calls `platform_name`. (Note that `show(::IO, ::AbstractPlatform)`, on the other hand, does not call `platform_name` and therefore does not have this issue.) To fix this, we can just have `platform_name(p)` return `os(p)` when the latter is not among the recognized set.
Author
Committer
Parents
Loading