Class: OrmDev::SHUtil
- Inherits:
-
Object
- Object
- OrmDev::SHUtil
- Defined in:
- lib/ormdev/source/util/sh_util.rb
Class Method Summary collapse
Class Method Details
.run_command(command, message = '', abort = true) ⇒ Object
工具方法
6 7 8 9 10 11 12 13 14 |
# File 'lib/ormdev/source/util/sh_util.rb', line 6 def self.run_command(command, = '', abort = true) result = system(command) if command.is_a?(String) OrmDev::LogUtil.print_command unless result then OrmDev::LogUtil.print_error "操作内容:#{}\n操作命令:" + "#{command}".magenta abort() if abort end result end |