Skip to content

Commit

Permalink
Removed unnecessary shell command evaluation.
Browse files Browse the repository at this point in the history
This belongs to #37 (comment)

Two things make the $() command evaluation unnecessary:

1) Has no effect. Providing a non existing branch still allows the last command in the chain to execute.
2) Fails in combination with login_shell=true, because the $() gets evaluated locally and not on the server, as it was probably intended.
  • Loading branch information
youngbrioche committed Jan 6, 2012
1 parent f5ab3c7 commit 1206010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/inploy/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def update_code
private

def checkout
branch.eql?("master") ? "" : "&& $(git branch | grep -vq #{branch}) && git checkout -f -b #{branch} origin/#{branch}"
branch.eql?("master") ? "" : "&& git checkout -f -b #{branch} origin/#{branch}"
end

def bundle
Expand Down

0 comments on commit 1206010

Please sign in to comment.