Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #56 from randallreedjr/bug/non-verbose-ssh-output
Browse files Browse the repository at this point in the history
[Bug] Suppress SSH output when run without --verbose option
  • Loading branch information
randallreedjr committed Feb 7, 2019
2 parents 91ab5d2 + 8d21aec commit eccd243
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Expand Up @@ -7,7 +7,9 @@ jobs:
build:
docker:
# specify the version you desire here
- image: circleci/ruby:2.4.1-node-browsers
- image: circleci/ruby:2.4.1-node-browsers
environment:
BUNDLER_VERSION: 2.0.1

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand All @@ -29,7 +31,7 @@ jobs:
- run:
name: install dependencies
command: |
gem install bundler -v '~> 1.17'
gem install bundler -v '~> 2.0.1'
bundle install --jobs=4 --retry=3 --path vendor/bundle
# - save_cache:
Expand Down
1 change: 1 addition & 0 deletions .ruby-gemset
@@ -0,0 +1 @@
git_switch
1 change: 1 addition & 0 deletions .ruby-version
@@ -0,0 +1 @@
2.5.1
2 changes: 1 addition & 1 deletion git_switch.gemspec
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|

spec.add_runtime_dependency "activesupport", "~> 5.2"

spec.add_development_dependency "bundler", "~> 1.17"
spec.add_development_dependency "bundler", "~> 2.0.1"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.1"
Expand Down
6 changes: 5 additions & 1 deletion lib/git_switch/switcher.rb
Expand Up @@ -78,7 +78,11 @@ def set_git_config

def set_ssh
`git config #{git_config_flag} core.sshCommand "#{ssh_command}"`
`ssh-add #{ssh}`
if options.verbose?
`ssh-add #{ssh}`
else
`ssh-add #{ssh} 2>/dev/null`
end
end

def usage
Expand Down
2 changes: 1 addition & 1 deletion lib/git_switch/version.rb
@@ -1,3 +1,3 @@
module GitSwitch
VERSION = "0.4.2"
VERSION = "0.4.3"
end

0 comments on commit eccd243

Please sign in to comment.