require_relative 'log_util' module OrmDev class SHUtil # 工具方法 def self.run_command(command, message = '', abort = true) result = system(command) if command.is_a?(String) OrmDev::LogUtil.print_command message unless result then OrmDev::LogUtil.print_error "操作内容:#{message}\n操作命令:" + "#{command}".magenta abort(message) if abort end result end end end