{"action":"created","issue":{"url":"https://api.github.com/repos/erlware/relx/issues/241","labels_url":"https://api.github.com/repos/erlware/relx/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/erlware/relx/issues/241/comments","events_url":"https://api.github.com/repos/erlware/relx/issues/241/events","html_url":"https://github.com/erlware/relx/issues/241","id":46965828,"number":241,"title":"possibility of picking up an incorrect config defined in env \"$CONFIG_PATH\" ","user":{"login":"RomanShestakov","id":23567,"avatar_url":"https://avatars.githubusercontent.com/u/23567?v=3","gravatar_id":"","url":"https://api.github.com/users/RomanShestakov","html_url":"https://github.com/RomanShestakov","followers_url":"https://api.github.com/users/RomanShestakov/followers","following_url":"https://api.github.com/users/RomanShestakov/following{/other_user}","gists_url":"https://api.github.com/users/RomanShestakov/gists{/gist_id}","starred_url":"https://api.github.com/users/RomanShestakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RomanShestakov/subscriptions","organizations_url":"https://api.github.com/users/RomanShestakov/orgs","repos_url":"https://api.github.com/users/RomanShestakov/repos","events_url":"https://api.github.com/users/RomanShestakov/events{/privacy}","received_events_url":"https://api.github.com/users/RomanShestakov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-10-27T22:06:30Z","updated_at":"2015-02-01T19:26:12Z","closed_at":"2015-02-01T17:05:34Z","body":"this bit  'if [ -z \"$CONFIG_PATH\" ]; then' in \"relx/priv/templates/extended_bin.dtl\" \r\n\r\nif [ -z \"$CONFIG_PATH\" ]; then\r\n    if [ -f \"$USE_DIR/sys.config\" ]; then\r\n        CONFIG_PATH=\"$USE_DIR/sys.config\"\r\n    else\r\n        CONFIG_PATH=\"$REL_DIR/sys.config\"\r\n    fi\r\nfi\r\n\r\nis actually quite nasty as it assumes that in your env. you don't have CONFIG_PATH set for any other purpose.  CONFIG_PATH is a generic name and in large prod environments it might set to the configs *un-related* to erlang apps. (that is exactly what happend to me recently). I had to unset CONFIG_PATH in my shell script which start erlang release to force the app to pick up the config from release dir.\r\n\r\nall I am saying - this is a potential trap for someone. Probably better to default to sys.config and if somebody needs to use a config from another location - it is always possible to pass it as command line arg.\r\n"},"comment":{"url":"https://api.github.com/repos/erlware/relx/issues/comments/72379566","html_url":"https://github.com/erlware/relx/issues/241#issuecomment-72379566","issue_url":"https://api.github.com/repos/erlware/relx/issues/241","id":72379566,"user":{"login":"RomanShestakov","id":23567,"avatar_url":"https://avatars.githubusercontent.com/u/23567?v=3","gravatar_id":"","url":"https://api.github.com/users/RomanShestakov","html_url":"https://github.com/RomanShestakov","followers_url":"https://api.github.com/users/RomanShestakov/followers","following_url":"https://api.github.com/users/RomanShestakov/following{/other_user}","gists_url":"https://api.github.com/users/RomanShestakov/gists{/gist_id}","starred_url":"https://api.github.com/users/RomanShestakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RomanShestakov/subscriptions","organizations_url":"https://api.github.com/users/RomanShestakov/orgs","repos_url":"https://api.github.com/users/RomanShestakov/repos","events_url":"https://api.github.com/users/RomanShestakov/events{/privacy}","received_events_url":"https://api.github.com/users/RomanShestakov/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T19:26:12Z","updated_at":"2015-02-01T19:26:12Z","body":"Thank you for fixing this!"}}