File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,6 @@ pre-flight() {
1111 # Installing git package
1212 pacman -S --noconfirm git
1313
14- # Installing ca-certificates package to avoid SSL issues
15- pacman -S --noconfirm ca-certificates
16- update-ca-trust
17-
1814 # Installing openssh package
1915 if [[ -n " ${SSH_PRIVATE_KEY} " ]]; then
2016 pacman -S --noconfirm openssh
@@ -58,6 +54,19 @@ init_ruby() {
5854
5955 # debug
6056 ruby -v && bundle version
57+
58+ # OpenSSL 3.6 broke Ruby's OpenSSL bindings, see: https://github.com/ruby/openssl/issues/949
59+ # By using the openssl gem, we can pick up the fixes without needing to upgrade Ruby.
60+ # Find the Gemfile directory by emulating `bundle init` behavior
61+ GEMFILE_DIR=${JEKYLL_SRC} ;
62+ while [ " $GEMFILE_DIR " != " /" ]; do
63+ [ -f " $GEMFILE_DIR /Gemfile" ] && break
64+ GEMFILE_DIR=$( dirname " $GEMFILE_DIR " )
65+ done
66+ if [ -f " $GEMFILE_DIR /Gemfile" ]; then
67+ echo " Adding openssl gem to Gemfile to fix compatibility with OpenSSL 3.6+"
68+ echo " gem 'openssl', '~> 3.3'" >> $GEMFILE_DIR /Gemfile
69+ fi
6170}
6271
6372pre-flight && init_ruby
You can’t perform that action at this time.
0 commit comments