diff options
author | Valery Sizov <vsv2711@gmail.com> | 2014-11-06 14:07:16 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2014-11-06 14:07:16 +0300 |
commit | d1b489e048e2bd9304ae335d9105e6efde99012b (patch) | |
tree | e6efd06a0fb92f936fb1931b0c51c1ba3b581bcd /lib/gitlab/utils.rb | |
parent | b33d4bc2f1d26ee3526b9d7f530f468a9d5b5a5e (diff) |
Revert "Revert "Don't output to stdout from lib non-interactive methods""
This reverts commit b33d4bc2f1d26ee3526b9d7f530f468a9d5b5a5e.
Diffstat (limited to 'lib/gitlab/utils.rb')
-rw-r--r-- | lib/gitlab/utils.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/gitlab/utils.rb b/lib/gitlab/utils.rb new file mode 100644 index 00000000000..bc30364550a --- /dev/null +++ b/lib/gitlab/utils.rb @@ -0,0 +1,14 @@ +module Gitlab + module Utils + extend self + + # Run system command without outputting to stdout. + # + # @param cmd [Array<String>] + # @return [Integer] exit status + def system_silent(cmd) + IO.popen(cmd).close + $?.exitstatus + end + end +end |