2015-04-26 12:48:37 +05:30
|
|
|
module Gitlab
|
|
|
|
module Utils
|
|
|
|
extend self
|
|
|
|
|
|
|
|
# Run system command without outputting to stdout.
|
|
|
|
#
|
|
|
|
# @param cmd [Array<String>]
|
|
|
|
# @return [Boolean]
|
|
|
|
def system_silent(cmd)
|
2016-09-13 17:45:13 +05:30
|
|
|
Popen.popen(cmd).last.zero?
|
2015-04-26 12:48:37 +05:30
|
|
|
end
|
2015-09-11 14:41:01 +05:30
|
|
|
|
|
|
|
def force_utf8(str)
|
|
|
|
str.force_encoding(Encoding::UTF_8)
|
|
|
|
end
|
2015-04-26 12:48:37 +05:30
|
|
|
end
|
|
|
|
end
|