heroku/heroku — pull request #1045 by pedro (2014-03-07 17:31:56+00:00)
Title: A mal-formed fork command can delete your application

Today, a colleague ran the following command:

heroku fork forum forum-staging

See the error? He forgot to include `-a` in there. As such, the toolbelt parses the command to mean "fork the forum app...to the forum app".

This fails, as you might expect, since the destination already exists.

However, as of da74e4bca94, the toolbelt *deletes* the destination app after *any* failure.

In other words, a fairly reasonable looking command, with a simple missing flag, can delete your application with no warning.

I'll leave the resolution ideas to those with better knowledge of the tool, but the situation as it stands feels dangerous enough that it warranted an issue.