bitwalker / bitwalker/distillery

Usage of --name prevents app from starting

Open
#701 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Elixir
Stars
3k
Forks
398
PR merge metrics
No merged PRs in 30d

Description

When I'm using a non-default distillery release (one that I added myself to rel/config.exs), I can't get my application to start with the generated release scripts. A minimal example is:

- create new mix project (e.g. test) and add distillery to mix.exs deps
- make application startable:
- add `mod: {Test, []}` to the list returned by the function `application` in mix.exs
- add `use Application` and a function `start(_,_)` that e.g. prints a test string to lib/test.ex
- run `mix distillery.init`
- add a second `release`, e.g. test2 to the end of rel/config.exs by simply copying and renaming the generated `release :test` entry

Now:
A) when running `mix distillery.release; _build/dev/rel/test/bin/test foreground` everything works well and I see the printed string from the start function
B) when running `mix distillery.release --name test2; _build/dev/rel/test/bin/test2 foreground` the release command succeeds but the foreground command does not print anything.

I'm running Elixir 1.8.1 on an up to date Archlinux and Distillery 2.1.1.

Files (for reference):

- [mix.exs](https://github.com/bitwalker/distillery/files/3414567/mix.exs.txt)
- [config.exs](https://github.com/bitwalker/distillery/files/3414568/config.exs.txt)
- [test.ex](https://github.com/bitwalker/distillery/files/3414569/test.ex.txt)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.