elixir-lang/elixir — pull request #2310 by alco (2014-05-21 11:37:44+00:00)
Title: Properly pass command-line arguments to the app

This fixes the case when running with no file:
```
mix run --no-halt -- --opt val
```

However, it will interpret the first argument as a file name even after `--`:

```
mix run --no-halt -- file
#=> No such file: file
```

This is the case where `--` used to have overloaded meaning because of `mix run`'s argument handling. We might need to add an option to `OptionParser` that will preserve `--` in the argument list if we want to keep the previous behaviour.

/cc @josevalim @lexmag @ericmj

---

Not sure how to write tests for this. I want to start an app and get `System.argv` from it to verify it is correct.