diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 4e843536460f..3ab105c768f0 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -29,8 +29,11 @@ jobs: - name: Simulate no openssl run: ruby util/remove_openssl.rb if: matrix.openssl == false - - name: Run installed rubygems + - name: Run a local rubygems command run: gem list bundler + - name: Run a remote rubygems command + run: gem outdated + if: matrix.openssl == true - name: Run bundler installed as a default gem run: bundle --version - name: Check bundler man pages were installed and are properly picked up diff --git a/lib/rubygems/source.rb b/lib/rubygems/source.rb index bed9c51346e8..ef232ff35d3c 100644 --- a/lib/rubygems/source.rb +++ b/lib/rubygems/source.rb @@ -179,7 +179,10 @@ def load_specs(type) local_file = File.join(cache_dir, file_name) retried = false - FileUtils.mkdir_p cache_dir if update_cache? + if update_cache? + require "fileutils" + FileUtils.mkdir_p cache_dir + end spec_dump = fetcher.cache_update_path spec_path, local_file, update_cache?