FIX pg_bindir on unofficial platforms
What does this merge request do and why?
pg_bindir
has been changed to use
GDK::PostgresqlUpgrader#available_versions
and fallback to using
pg_config
in case of exception. But that doesn't work :
#available_versions
uses abort
instead of raise
, which is not
rescueable, so support/pg_bindir
exits with a non-zero status without printing anything.
Sadly, this causes gdk install
to fail on non official platforms, right now (although, it's not the only reason :) ).
How to set up and validate locally
Given it's platform dependent, you can't reproduce the bug if you're on a supported platform. But you can observe the buggy behavior testing those scripts:
This will not be rescued:
begin
abort 'Help!'
rescue StandardError
puts 'saved!'
end
This will properly be rescued:
begin
raise 'Help!'
rescue StandardError
puts 'saved!'
end
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise an issue to follow-up. -
Documentation added/updated, if needed. -
Announcement added, if change is notable. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Edited by kik