Skip to content

Enforce clipboard command being available in bin/feature-flag

What does this MR do and why?

Following a report (internal) where no copy to clipboard command is installed, this enforces that such a command must be installed before running bin/feature-flag. That way we fail early to avoid losing the entered info by the developer when copy_to_clipboard_command is nil.

Alternatively, we could also just puts the issue description (or write it to a file) and let the developer copy it themselves from the terminal (or file).

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Either uninstall your copy to clipboard command or simply comment them out in the COPY_COMMANDS array
  2. Switch to a feature branch
  3. Run bin/feature-flag test-feature-flag
  4. See that it fails with the error to install a copy to clipboard tool

Merge request reports