Skip to content

Commit 0721540

Browse files
authored
chore: don't shim wrappers if project doesn't have wrappers enabled (#1118)
1 parent c92c659 commit 0721540

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ EOF
174174
function patch_wrappers {
175175
local IS_NIX_UPGRADE=$1
176176

177+
WRAPPERS_ENABLED=$(run_sql -A -t -c "SELECT EXISTS(SELECT 1 FROM pg_extension WHERE extname = 'wrappers');")
178+
if [ "$WRAPPERS_ENABLED" = "f" ]; then
179+
echo "Wrappers extension not enabled. Skipping."
180+
return
181+
fi
182+
177183
# This is a workaround for older versions of wrappers which don't have the expected
178184
# naming scheme, containing the version in their library's file name
179185
# e.g. wrappers-0.1.16.so, rather than wrappers.so

nix/ext/wrappers/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
let
1414
gitTags = builtins.fromJSON (builtins.readFile (builtins.fetchurl {
1515
url = "https://api.github.com/repos/supabase/wrappers/tags";
16-
sha256 = "0am40yspir70wp8pik1c7qmfvbby3nyxza115pi9klp6fyv2s93j"; # Replace with actual hash
16+
sha256 = "0pvavn0f8wnaszq4bmvjkadm6xbvf91rbhcmmgjasqajb69vskv9"; # Replace with actual hash
1717
}));
1818
in
1919
buildPgrxExtension_0_11_3 rec {

0 commit comments

Comments
 (0)