10up/wpsnapshots

wpsnapshots push -n results in error, related to #55

Opened this issue · 1 comments

Describe the bug
If you issue wpsnapshosts push -n you will get an error because the project slug value isn't present.

When you issue wpsnapshots create -n and then wpsnapshots push <id> the operation does issue the error but it also fails to actually push the snapshot up.

Steps to Reproduce

  1. Create an awesome new project
  2. Attempt to create a snapshot and because you don't want to answer all those pesky questions you pass -n
  3. Become sad because the snapshot fails with
Fatal error: Uncaught Error: Call to undefined method UnexpectedValueException::getAwsErrorCode() in ...vendor/10up/wpsnapshots/src/classes/DB.php on line 167

Expected behavior
As mentioned in #55, adding a --project option would allow someone to create a snapshot without interaction. This is crucial when trying to automate the process as well.

Additional context
One of my goals is to allow wpsnapshots to be scripted/automated. By providing a few more options I believe I can achieve that.

@dustinrue any chance you could put a PR together?