diff --git a/bundler/lib/bundler/uri_credentials_filter.rb b/bundler/lib/bundler/uri_credentials_filter.rb index 3f49254e716a..ccfaf0bc5de0 100644 --- a/bundler/lib/bundler/uri_credentials_filter.rb +++ b/bundler/lib/bundler/uri_credentials_filter.rb @@ -8,6 +8,8 @@ def credential_filtered_uri(uri_to_anonymize) return uri_to_anonymize if uri_to_anonymize.nil? uri = uri_to_anonymize.dup if uri.is_a?(String) + return uri if File.exist?(uri) + require_relative "vendored_uri" uri = Bundler::URI(uri) end diff --git a/bundler/spec/install/deploy_spec.rb b/bundler/spec/install/deploy_spec.rb index 9992e2e00fdc..5f4fc7149956 100644 --- a/bundler/spec/install/deploy_spec.rb +++ b/bundler/spec/install/deploy_spec.rb @@ -361,10 +361,7 @@ bundle "config set --local deployment true" bundle :install, :raise_on_error => false expect(err).to include("deployment mode") - # The drive letter of the Windows environment is fragile value in GitHub Actions - unless Gem.win_platform? - expect(err).to include("You have deleted from the Gemfile:\n* source: #{lib_path("rack-1.0")} (at master@#{revision_for(lib_path("rack-1.0"))[0..6]}") - end + expect(err).to include("You have deleted from the Gemfile:\n* source: #{lib_path("rack-1.0")} (at master@#{revision_for(lib_path("rack-1.0"))[0..6]}") expect(err).not_to include("You have added to the Gemfile") expect(err).not_to include("You have changed in the Gemfile") end @@ -388,10 +385,7 @@ bundle "config set --local deployment true" bundle :install, :raise_on_error => false expect(err).to include("deployment mode") - # The drive letter of the Windows environment is fragile value in GitHub Actions - unless Gem.win_platform? - expect(err).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `#{lib_path("rack")} (at master@#{revision_for(lib_path("rack"))[0..6]})`") - end + expect(err).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `#{lib_path("rack")} (at master@#{revision_for(lib_path("rack"))[0..6]})`") expect(err).not_to include("You have added to the Gemfile") expect(err).not_to include("You have deleted from the Gemfile") end