Skip to content

Remove stdout and stderr shorthands in base command

Overview

In !2103 (merged), we replaced the stdout and stderr in GDK::Command::BaseCommand with GDK::Output instead of the $stdout/$stderr globals.

Proposal

Everywhere, where we reference stdout and stderr (without leading $!) inside lib/gdk/command/*, replace that with GDK::Output.

Implementation Guide

Currently, the only remaining use of the stdout helper shorthand is in lib/gdk/command/debug_info.rb and lib/gdk/command/diff_config.rb.

  1. Suggestion: if you don’t have access already, request access to https://gitlab.com/gitlab-community. You can also work on a personal fork of this project though.
  2. In each of these files, look for stdout (without leading $)
  3. Replace each of these instances with GDK::Output
  4. In lib/gdk/command/base_command.rb remove the initialize method, since we no longer need to be able to configure stdout and stderr
  5. Commit everything to a new branch in https://gitlab.com/gitlab-community/gitlab-development-kit and open a merge request
Edited by Kev Kloss