Skip to content

Commit

Permalink
chore: don't shim wrappers if project doesn't have wrappers enabled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pcnc authored Aug 14, 2024
1 parent c92c659 commit 0721540
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ EOF
function patch_wrappers {
local IS_NIX_UPGRADE=$1

WRAPPERS_ENABLED=$(run_sql -A -t -c "SELECT EXISTS(SELECT 1 FROM pg_extension WHERE extname = 'wrappers');")
if [ "$WRAPPERS_ENABLED" = "f" ]; then
echo "Wrappers extension not enabled. Skipping."
return
fi

# This is a workaround for older versions of wrappers which don't have the expected
# naming scheme, containing the version in their library's file name
# e.g. wrappers-0.1.16.so, rather than wrappers.so
Expand Down
2 changes: 1 addition & 1 deletion nix/ext/wrappers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
let
gitTags = builtins.fromJSON (builtins.readFile (builtins.fetchurl {
url = "https://api.github.com/repos/supabase/wrappers/tags";
sha256 = "0am40yspir70wp8pik1c7qmfvbby3nyxza115pi9klp6fyv2s93j"; # Replace with actual hash
sha256 = "0pvavn0f8wnaszq4bmvjkadm6xbvf91rbhcmmgjasqajb69vskv9"; # Replace with actual hash
}));
in
buildPgrxExtension_0_11_3 rec {
Expand Down

0 comments on commit 0721540

Please sign in to comment.