gitlab-org--gitlab-foss/lib/gitlab/utils.rb

14 lines
245 B
Ruby
Raw Normal View History

module Gitlab
module Utils
extend self
# Run system command without outputting to stdout.
#
# @param cmd [Array<String>]
2014-11-06 04:47:38 -05:00
# @return [Boolean]
def system_silent(cmd)
2014-11-06 04:47:38 -05:00
Popen::popen(cmd).last.zero?
end
end
end