Description
The Site Health feature tests currently contain workarounds for the gs: not found error emitted by WordPress Core when Ghostscript is not installed.
For example:
# Ignore "gs: not found" error,
# triggered by https://github.com/WordPress/wordpress-develop/blob/8c374a5adb9bee9333a013a575b3aa0e828085be/src/wp-admin/includes/class-wp-debug-data.php#L746
When I try `wp site-health check --fields=check,type,status --format=csv`
Similar comments are present for wp site-health status and wp site-health list-info-sections, as well as in other Site Health scenarios.
These workarounds were introduced by @swissspidy in commit 24144a7 to accommodate the output generated by WordPress Core.
WordPress Core issue
The underlying issue has been reported in WordPress Core:
WP_Debug_Data::get_wp_media() currently runs:
When Ghostscript is not installed, the shell writes gs: not found to STDERR.
The proposed Core fix checks whether gs is available before executing it:
command -v gs >/dev/null && gs --version
This prevents the shell error from being emitted when Ghostscript is not installed.
The PR is not merged yet.
Proposed change
If the WordPress Core fix is merged, should the gs: not found workarounds in features/site-health.feature be removed?
The intention would be to remove the obsolete comments while keeping the existing test assertions unchanged.
We would not add an assertion requiring gs: not found to be absent from STDERR, since the test suite supports older WordPress versions where the original Core behavior may still be present.
Related
Description
The Site Health feature tests currently contain workarounds for the
gs: not founderror emitted by WordPress Core when Ghostscript is not installed.For example:
Similar comments are present for
wp site-health statusandwp site-health list-info-sections, as well as in other Site Health scenarios.These workarounds were introduced by @swissspidy in commit 24144a7 to accommodate the output generated by WordPress Core.
WordPress Core issue
The underlying issue has been reported in WordPress Core:
WP_Debug_Data::get_wp_media()currently runs:When Ghostscript is not installed, the shell writes
gs: not foundto STDERR.The proposed Core fix checks whether
gsis available before executing it:command -v gs >/dev/null && gs --versionThis prevents the shell error from being emitted when Ghostscript is not installed.
The PR is not merged yet.
Proposed change
If the WordPress Core fix is merged, should the
gs: not foundworkarounds infeatures/site-health.featurebe removed?The intention would be to remove the obsolete comments while keeping the existing test assertions unchanged.
We would not add an assertion requiring
gs: not foundto be absent from STDERR, since the test suite supports older WordPress versions where the original Core behavior may still be present.Related
Fix tests