about summary refs log tree commit diff
path: root/lib/tasks
diff options
context:
space:
mode:
authorStarfall <root@starfall.blue>2020-03-01 14:49:21 -0600
committerStarfall <root@starfall.blue>2020-03-01 14:49:21 -0600
commit12d35783db1bb302d7540d8d3690ab6eed3dac3b (patch)
tree66f1db08a2f6f9ae2254ba7a81b71835039d671e /lib/tasks
parent22a55edc158352003a3953964c9d332a60c86428 (diff)
Revert "Merge branch 'glitch'"
Login is broken

This reverts commit 22a55edc158352003a3953964c9d332a60c86428, reversing
changes made to 5902299384d15249fe4b84b8761d4a49f3c7f6fd.
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/mastodon.rake15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake
index a873335d4..2e92e8ded 100644
--- a/lib/tasks/mastodon.rake
+++ b/lib/tasks/mastodon.rake
@@ -336,20 +336,7 @@ namespace :mastodon do
       if prompt.yes?('Save configuration?')
         cmd = TTY::Command.new(printer: :quiet)
 
-        env_contents = env.each_pair.map do |key, value|
-          if value.is_a?(String) && value =~ /[\s\#\\"]/
-            if value =~ /[']/
-              value = value.to_s.gsub(/[\\"\$]/) { |x| "\\#{x}" }
-              "#{key}=\"#{value}\""
-            else
-              "#{key}='#{value}'"
-            end
-          else
-            "#{key}=#{value}"
-          end
-        end.join("\n")
-
-        File.write(Rails.root.join('.env.production'), "# Generated with mastodon:setup on #{Time.now.utc}\n\n" + env_contents + "\n")
+        File.write(Rails.root.join('.env.production'), "# Generated with mastodon:setup on #{Time.now.utc}\n\n" + env.each_pair.map { |key, value| "#{key}=#{value}" }.join("\n") + "\n")
 
         if using_docker
           prompt.ok 'Below is your configuration, save it to an .env.production file outside Docker:'