module GitCli::Common
Public Instance Methods
log_debug(str)
click to toggle source
# File lib/git_cli.rb, line 62 def log_debug(str) GitCli::Global.instance.logger.debug(str) end
log_error(str)
click to toggle source
# File lib/git_cli.rb, line 66 def log_error(str) GitCli::Global.instance.logger.error(str) end
log_warn(str)
click to toggle source
# File lib/git_cli.rb, line 70 def log_warn(str) GitCli::Global.instance.logger.warn(str) end
os_exec(path, &block)
click to toggle source
# File lib/git_cli.rb, line 48 def os_exec(path, &block) # redirect stderr to stdout path = "#{path} 2>&1" res = Antrapol::ToolRack::ProcessUtilsEngine.exec(path) if block # $?.exitstatus => error codes # $?.success? => true / false # $?.pid => child PID block.call($?, res) else res.strip end end