execute!

in lib/gitlab/qa/support/shell_command.rb [30:61]


        def execute! 
          raise StatusError, 'Command already executed' if output.any?

          logger.info("Shell command: `#{mask_secrets(command).cyan}`")

          Open3.popen2e(command.to_s) do |stdin, out, wait|
            if @stdin_data
              stdin.puts(@stdin_data)
              stdin.close
            end

            out.each do |line|
              output.push(line)

              if stream_progress
                print "."
              elsif stream_output
                puts line
              end

              yield line, wait if block_given?
            end
            puts if stream_progress && !output.empty?

            fail! if wait.value.exited? && wait.value.exitstatus.nonzero?

            logger.debug("Shell command output:\n#{string_output}") unless stream_output || output.empty?
          end

          string_output
        end