Skip to content

Commit

Permalink
Merge pull request #12 from jobwat/simple-quotes-for-mysql-inline-pas…
Browse files Browse the repository at this point in the history
…sword

simple quotes, no escape for mysql inline password
  • Loading branch information
sgruhier committed Apr 17, 2013
2 parents 5186d89 + 39e35b2 commit 37f1a50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/capistrano-db-tasks/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def postgresql?

def credentials
if mysql?
(@config['username'] ? " -u #{@config['username']} " : '') + (@config['password'] ? " -p\"#{@config['password']}\" " : '') + (@config['host'] ? " -h #{@config['host']}" : '') + (@config['socket'] ? " -S#{@config['socket']}" : '')
(@config['username'] ? " -u #{@config['username']} " : '') + (@config['password'] ? " -p'#{@config['password']}' " : '') + (@config['host'] ? " -h #{@config['host']}" : '') + (@config['socket'] ? " -S#{@config['socket']}" : '')
elsif postgresql?
(@config['username'] ? " -U #{@config['username']} " : '') + (@config['host'] ? " -h #{@config['host']}" : '')
end
Expand Down

0 comments on commit 37f1a50

Please sign in to comment.