diff options
author | Samuel E. Giddins <segiddins@segiddins.me> | 2015-03-02 11:18:07 -0800 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-07-05 15:10:43 -0300 |
commit | 9982bc92fafedecfe2886c7c769b87e84fb93e17 (patch) | |
tree | 0dfb8aca065e68101bacab361fdb85f00a78d401 | |
parent | cc4df62a4707281fc657101a93710c63ed957a70 (diff) | |
download | bundler-9982bc92fafedecfe2886c7c769b87e84fb93e17.tar.gz |
[SourceList] Warn when adding a git source using the git procotol
-rw-r--r-- | lib/bundler/source_list.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb index fdc77cb23d..cc67a72194 100644 --- a/lib/bundler/source_list.rb +++ b/lib/bundler/source_list.rb @@ -22,7 +22,12 @@ module Bundler end def add_git_source(options = {}) - add_source_to_list Source::Git.new(options), git_sources + source = add_source_to_list Source::Git.new(options), git_sources + if source.uri =~ /^git:/ + Bundler.ui.warn "The git source `#{source.uri}` uses the `git` protocol, " \ + "please consider changing it to `https`, which is more secure." + end + source end def add_rubygems_source(options = {}) |