Skip to content

Commit

Permalink
Remove some unwanted stdout prints
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandro-fazzi committed Jan 3, 2022
1 parent 9c1a4c8 commit b30377c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions lib/wordmove/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,9 @@ def ensure_wordpress_options_presence!(cli_options)
exit 1
end

def initial_context(cli_options)
cli_options.deep_symbolize_keys!
movefile = Wordmove::Movefile.new(cli_options)

[cli_options, movefile]
end

def movefile_from(**cli_options)
def movefile_from(cli_options)
ensure_wordpress_options_presence!(cli_options)
Wordmove::Movefile.new(cli_options)
Wordmove::Movefile.new(cli_options, nil, true)
rescue MovefileNotFound => e
Logger.new($stdout).error(e.message)
exit 1
Expand Down
2 changes: 1 addition & 1 deletion lib/wordmove/doctor/movefile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Movefile
attr_reader :movefile, :contents, :root_keys

def initialize(cli_options = {}, dir = '.')
@movefile = Wordmove::Movefile.new(cli_options, dir)
@movefile = Wordmove::Movefile.new(cli_options, dir, false)

begin
@contents = movefile.options
Expand Down
2 changes: 1 addition & 1 deletion lib/wordmove/doctor/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(movefile_name = nil, movefile_dir = '.')
@logger = Logger.new($stdout).tap { |l| l.level = Logger::INFO }
begin
@config = Wordmove::Movefile
.new({ config: movefile_name }, movefile_dir)
.new({ config: movefile_name }, movefile_dir, false)
.options[:local][:database]
rescue Psych::SyntaxError => e
logger.error e.message
Expand Down

0 comments on commit b30377c

Please sign in to comment.