Permalink
Browse files

Set staging_domain to a blank string if it is falsey

  • Loading branch information...
1 parent 9e032bf commit 5711e450e9c5f96e2172c43c2659067282c362e1 @markjaquith committed Aug 18, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/tasks.rb
View
@@ -68,6 +68,7 @@
end
desc "Sets the database credentials (and other settings) in wp-config.php"
task :make_config do
+ staging_domain ||= ''
{:'%%WP_STAGING_DOMAIN%%' => staging_domain, :'%%WP_STAGE%%' => stage, :'%%DB_NAME%%' => wpdb[stage][:name], :'%%DB_USER%%' => wpdb[stage][:user], :'%%DB_PASSWORD%%' => wpdb[stage][:password], :'%%DB_HOST%%' => wpdb[stage][:host]}.each do |k,v|
run "sed -i 's/#{k}/#{v}/' #{release_path}/wp-config.php", :roles => :web
end

0 comments on commit 5711e45

Please sign in to comment.