Skip to content

Commit

Permalink
Use logger
Browse files Browse the repository at this point in the history
  • Loading branch information
SDRACK committed Dec 14, 2023
1 parent 6c31160 commit f2ef731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vite_ruby/lib/vite_ruby/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ def run(argv, exec: false)
config.within_root {
cmd = command_for(argv)

puts "Running: #{ cmd.join(' ') }"
return Kernel.exec(*cmd) if exec

log_or_noop = ->(line) { logger.info('vite') { line } } unless config.hide_build_console_output
log_or_noop.call(cmd)
ViteRuby::IO.capture(*cmd, chdir: config.root, with_output: log_or_noop)
}
rescue Errno::ENOENT => error
Expand Down

0 comments on commit f2ef731

Please sign in to comment.