Skip to content

Commit

Permalink
Merge pull request #94 from tmatilai/unset_git_config
Browse files Browse the repository at this point in the history
Don't fail if removing non-existing git proxy configuration
  • Loading branch information
otahi committed Dec 1, 2014
2 parents a7110ea + f1c57b8 commit 98ebd64
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/vagrant-proxyconf/action/configure_git_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ def config
end

def configure_machine
command = "#{git_path} config --system "
if config.http
command << "http.proxy #{config.http}"
@machine.communicate.sudo(
"#{git_path} config --system http.proxy #{config.http}")
else
command << "--unset-all http.proxy"
@machine.communicate.sudo(
"#{git_path} config --system --unset-all http.proxy",
error_check: false)
end
@machine.communicate.sudo(command)
end

def git_path
Expand Down

0 comments on commit 98ebd64

Please sign in to comment.