class ViteRuby::Runner
def run(argv, exec: false)
def run(argv, exec: false) config.within_root { cmd = command_for(argv) return Kernel.exec(*cmd) if exec log_or_noop = ->(line) { logger.info('vite') { line } } unless config.hide_build_console_output ViteRuby::IO.capture(*cmd, chdir: config.root, with_output: log_or_noop) } rescue Errno::ENOENT => error raise ViteRuby::MissingExecutableError, error end