diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-11-04 02:50:07 +0300 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-11-05 14:35:33 +0300 |
commit | 0b1084a4538bc46684c8620410988d3b1093e7ab (patch) | |
tree | 3bf6e43ac7ca966d00be25ec5b21509a83f169e8 /lib/gitlab/utils.rb | |
parent | 1b1403804e03db3cea3ad6a84dcfead449ed29d5 (diff) |
Don't output to stdout from lib non-interactive methods
It pollutes the test output too much.
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 |