diff options
author | Starfall <admin@plural.cafe> | 2020-06-19 13:14:45 -0500 |
---|---|---|
committer | Starfall <admin@plural.cafe> | 2020-06-19 13:14:45 -0500 |
commit | 5668836f56cddf3257f38a2483c1d42cacbad3a8 (patch) | |
tree | c241a44562f79ccecaf215eb572c22d559b08dd1 /lib/tasks/mastodon.rake | |
parent | 76f79dd29909d39f1d36ef48e6892223d59e29d7 (diff) | |
parent | c7da2cc5a1821e589e7241aec21d8bb426722c2a (diff) |
Merge branch 'glitch' into main
Diffstat (limited to 'lib/tasks/mastodon.rake')
-rw-r--r-- | lib/tasks/mastodon.rake | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index a873335d4..9e80989ef 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -1,6 +1,5 @@ # frozen_string_literal: true -require 'tty-command' require 'tty-prompt' namespace :mastodon do @@ -334,8 +333,6 @@ namespace :mastodon do prompt.say 'This configuration will be written to .env.production' 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 =~ /[']/ @@ -367,7 +364,7 @@ namespace :mastodon do prompt.say 'Running `RAILS_ENV=production rails db:setup` ...' prompt.say "\n\n" - if cmd.run!({ RAILS_ENV: 'production', SAFETY_ASSURED: 1 }, :rails, 'db:setup').failure? + if !system(env.transform_values(&:to_s).merge({ 'RAILS_ENV' => 'production', 'SAFETY_ASSURED' => '1' }), 'rails db:setup') prompt.error 'That failed! Perhaps your configuration is not right' else prompt.ok 'Done!' @@ -382,7 +379,7 @@ namespace :mastodon do prompt.say 'Running `RAILS_ENV=production rails assets:precompile` ...' prompt.say "\n\n" - if cmd.run!({ RAILS_ENV: 'production' }, :rails, 'assets:precompile').failure? + if !system(env.transform_values(&:to_s).merge({ 'RAILS_ENV' => 'production' }), 'rails assets:precompile') prompt.error 'That failed! Maybe you need swap space?' else prompt.say 'Done!' |