'gdk pristine' should ask before deleting backups and logs

Overview

gdk pristine deletes gdk.yml backups and logs in GDK. That is a potentially destructive operation, especially when troubleshooting.

Impacted categories

The following categories relate to this issue:

Impact

  • Restoring after troubleshooting: Users won’t accidentally delete backups of their gdk.yml, which were created during troubleshooting and to which users may want to revert back to after restoring GDK to a healthy state.
  • Harder troubleshooting: By deleting all GDK Rake logs, troubleshooting can become more cumbersome.

Implementation plan

In lib/gdk/command/pristine.rb, we should do one of the following:

  1. delete only logs and config backups that are older than a given threshold (e.g. a month or a week), or
  2. ask the user whether or not they want to delete the logs and config backups.
Edited by Kev Kloss