jasonm23/phoenix — pull request #9 by mathias (2014-09-06 14:27:42+00:00)
Title: Stop crashing due to exception 'must provide array of arguments' on api.runCommand()

When I add the following to my `~/.phoenix.js`:

```javascript
api.runCommand("/bin/date");
```

Phoenix crashes. The console shows it is crashing rather than handling the exception of "must provide array of arguments" to `runCommand()`. One way around this (I'm no Objective-C expert) seems to be to only set the arguments on the command if they exist.

This commit stops the app from crashing.

Console crash log:

```
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'must provide array of arguments'
abort() called
terminating with uncaught exception of type NSException
```