Skip to content

Commit

Permalink
Only call Oj.mimic_JSON when in a CLI run
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Jan 8, 2021
1 parent bc53f2c commit 5ba4d92
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions lib/krane.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

require 'oj'
require 'krane/deploy_task'
require 'krane/render_task'
require 'krane/restart_task'
Expand Down
5 changes: 5 additions & 0 deletions lib/krane/cli/krane.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ class Krane < Thor

package_name "Krane"

def self.start(*)
Oj.mimic_JSON
super
end

def self.expand_options(task_options)
task_options.each { |option_name, config| method_option(option_name, config) }
end
Expand Down
1 change: 0 additions & 1 deletion lib/krane/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
require 'colorized_string'

require 'krane/version'
require 'krane/oj'
require 'krane/errors'
require 'krane/formatted_logger'
require 'krane/statsd'
Expand Down
4 changes: 0 additions & 4 deletions lib/krane/oj.rb

This file was deleted.

0 comments on commit 5ba4d92

Please sign in to comment.