{"action":"created","issue":{"url":"https://api.github.com/repos/johnhamelink/exrm_deb/issues/6","repository_url":"https://api.github.com/repos/johnhamelink/exrm_deb","labels_url":"https://api.github.com/repos/johnhamelink/exrm_deb/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/johnhamelink/exrm_deb/issues/6/comments","events_url":"https://api.github.com/repos/johnhamelink/exrm_deb/issues/6/events","html_url":"https://github.com/johnhamelink/exrm_deb/issues/6","id":140666153,"number":6,"title":"Failed to execute after_release hook for Elixir.ReleaseManager.Plugin.Deb","user":{"login":"niku","id":10890,"avatar_url":"https://avatars.githubusercontent.com/u/10890?v=3","gravatar_id":"","url":"https://api.github.com/users/niku","html_url":"https://github.com/niku","followers_url":"https://api.github.com/users/niku/followers","following_url":"https://api.github.com/users/niku/following{/other_user}","gists_url":"https://api.github.com/users/niku/gists{/gist_id}","starred_url":"https://api.github.com/users/niku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niku/subscriptions","organizations_url":"https://api.github.com/users/niku/orgs","repos_url":"https://api.github.com/users/niku/repos","events_url":"https://api.github.com/users/niku/events{/privacy}","received_events_url":"https://api.github.com/users/niku/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-14T12:57:23Z","updated_at":"2016-03-17T12:22:49Z","closed_at":null,"body":"I ran into error when I executed `exrm release --deb` in my sandbox.\r\nHere is a log:\r\n\r\n```\r\nsrc$ cat /etc/debian_version\r\n8.3\r\n\r\nsrc$ uname -a\r\nLinux packer-virtualbox-iso-1457657143 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux\r\n\r\nsrc$ elixir -v\r\nErlang/OTP 18 [erts-7.2] [source] [64-bit] [async-threads:10] [kernel-poll:false]\r\n\r\nElixir 1.2.3\r\n\r\nsrc$ mix -v\r\nMix 1.2.3\r\n\r\nsrc$ mix new --sup exrm_deb_sandbox\r\n* creating README.md\r\n* creating .gitignore\r\n* creating mix.exs\r\n* creating config\r\n* creating config/config.exs\r\n* creating lib\r\n* creating lib/exrm_deb_sandbox.ex\r\n* creating test\r\n* creating test/test_helper.exs\r\n* creating test/exrm_deb_sandbox_test.exs\r\n\r\nYour Mix project was created successfully.\r\nYou can use \"mix\" to compile it, test it, and more:\r\n\r\n    cd exrm_deb_sandbox\r\n    mix test\r\n\r\nRun \"mix help\" for more commands.\r\n\r\nsrc$ cd exrm_deb_sandbox/\r\n\r\nsrc/exrm_deb_sandbox$  git init && git add . && git commit -am \"First Import\"\r\n\r\nsrc/exrm_deb_sandbox$ (...edit mix.exs...)\r\n\r\nsrc/exrm_deb_sandbox$ git show\r\ncommit b6e5ed019ea196358d37baaa2443e7358ce6a64b\r\nAuthor: niku <niku@niku.name>\r\nDate:   Mon Mar 14 20:11:28 2016 +0900\r\n\r\n    Use exrm_deb\r\n\r\ndiff --git a/mix.exs b/mix.exs\r\nindex 6ee8bb4..246a39b 100644\r\n--- a/mix.exs\r\n+++ b/mix.exs\r\n@@ -7,14 +7,16 @@ defmodule ExrmDebSandbox.Mixfile do\r\n      elixir: \"~> 1.2\",\r\n      build_embedded: Mix.env == :prod,\r\n      start_permanent: Mix.env == :prod,\r\n-     deps: deps]\r\n+     deps: deps,\r\n+     description: \"A sandbox of exrm_deb\",\r\n+     package: package]\r\n   end\r\n\r\n   # Configuration for the OTP application\r\n   #\r\n   # Type \"mix help compile.app\" for more information\r\n   def application do\r\n-    [applications: [:logger],\r\n+    [applications: [:logger, :exrm_deb],\r\n      mod: {ExrmDebSandbox, []}]\r\n   end\r\n\r\n@@ -28,6 +30,20 @@ defmodule ExrmDebSandbox.Mixfile do\r\n   #\r\n   # Type \"mix help deps\" for more examples and options\r\n   defp deps do\r\n-    []\r\n+    [{:exrm_deb, \"0.0.4\"}]\r\n+  end\r\n+\r\n+  defp package do\r\n+    [\r\n+      external_dependencies: [],\r\n+      license_file: \"LICENSE\",\r\n+      maintainers: [\"niku <niku@niku.name>\"],\r\n+      licenses: [\"MIT\"],\r\n+      vendor: \"niku\",\r\n+      links:  %{\r\n+        \"GitHub\" => \"https://github.com/niku/exrm_deb_sandbox\",\r\n+        \"Homepage\" => \"https://github.com/niku/exrm_deb_sandbox\"\r\n+      }\r\n+    ]\r\n   end\r\n end\r\n\r\nsrc/exrm_deb_sandbox$ mix do deps.get, release --deb\r\n(...snip...)\r\n==> exrm_deb\r\nCompiled lib/exrm_deb.ex\r\nCompiled lib/exrm_deb/control.ex\r\nCompiled lib/exrm_deb/data.ex\r\nCompiled lib/exrm_deb/deb.ex\r\nCompiled lib/exrm_deb/generators/changelog.ex\r\nCompiled lib/exrm_deb/config.ex\r\nCompiled lib/exrm_deb/generators/control.ex\r\nCompiled lib/exrm_deb/generators/systemd.ex\r\nCompiled lib/exrm_deb/generators/template_finder.ex\r\nCompiled lib/exrm_deb/generators/upstart.ex\r\nCompiled lib/exrm_deb/utils/compression.ex\r\nCompiled lib/exrm_deb/utils/config.ex\r\nCompiled lib/exrm_deb/utils/file.ex\r\nlib/mix/tasks/release.deb.generate_templates.ex:25: warning: variable source is unused\r\nCompiled lib/mix/tasks/release.deb.generate_templates.ex\r\nGenerated exrm_deb app\r\n==> exrm_deb_sandbox\r\nCompiled lib/exrm_deb_sandbox.ex\r\nGenerated exrm_deb_sandbox app\r\nConsolidated Timex.Date.Convert\r\nConsolidated Vex.Validator.Source\r\nConsolidated Vex.Extract\r\nConsolidated Vex.Blank\r\nConsolidated List.Chars\r\nConsolidated String.Chars\r\nConsolidated Collectable\r\nConsolidated Enumerable\r\nConsolidated IEx.Info\r\nConsolidated Inspect\r\nBuilding release with MIX_ENV=dev.\r\n==> Failed to execute after_release hook for Elixir.ReleaseManager.Plugin.Deb!\r\n** (FunctionClauseError) no function clause matching in IO.chardata_to_string/1\r\n    (elixir) lib/io.ex:346: IO.chardata_to_string(nil)\r\n    (elixir) lib/path.ex:467: Path.join/2\r\n    (elixir) lib/path.ex:449: Path.join/1\r\n    lib/exrm_deb/generators/changelog.ex:14: ExrmDeb.Generators.Changelog.build/2\r\n    lib/exrm_deb/data.ex:10: ExrmDeb.Data.build/2\r\n    lib/exrm_deb.ex:26: ReleaseManager.Plugin.Deb.start_build/1\r\n    lib/mix/tasks/release.ex:262: anonymous fn/2 in Mix.Tasks.Release.execute_after_hooks/1\r\n    (elixir) lib/enum.ex:1473: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n\r\nsrc/exrm_deb_sandbox$ cat mix.lock \r\n%{\"bbmustache\": {:hex, :bbmustache, \"1.0.4\"},\r\n  \"certifi\": {:hex, :certifi, \"0.4.0\"},\r\n  \"cf\": {:hex, :cf, \"0.2.1\"},\r\n  \"combine\": {:hex, :combine, \"0.7.0\"},\r\n  \"earmark\": {:hex, :earmark, \"0.2.1\"},\r\n  \"erlware_commons\": {:hex, :erlware_commons, \"0.19.0\"},\r\n  \"ex_doc\": {:hex, :ex_doc, \"0.11.4\"},\r\n  \"exrm\": {:hex, :exrm, \"1.0.2\"},\r\n  \"exrm_deb\": {:hex, :exrm_deb, \"0.0.4\"},\r\n  \"getopt\": {:hex, :getopt, \"0.8.2\"},\r\n  \"hackney\": {:hex, :hackney, \"1.5.1\"},\r\n  \"idna\": {:hex, :idna, \"1.1.0\"},\r\n  \"metrics\": {:hex, :metrics, \"1.0.1\"},\r\n  \"mimerl\": {:hex, :mimerl, \"1.0.2\"},\r\n  \"providers\": {:hex, :providers, \"1.6.0\"},\r\n  \"relx\": {:hex, :relx, \"3.18.0\"},\r\n  \"ssl_verify_hostname\": {:hex, :ssl_verify_hostname, \"1.0.6\"},\r\n  \"timex\": {:hex, :timex, \"1.0.2\"},\r\n  \"tzdata\": {:hex, :tzdata, \"0.5.6\"},\r\n  \"vex\": {:hex, :vex, \"0.5.5\"}}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/johnhamelink/exrm_deb/issues/comments/197854729","html_url":"https://github.com/johnhamelink/exrm_deb/issues/6#issuecomment-197854729","issue_url":"https://api.github.com/repos/johnhamelink/exrm_deb/issues/6","id":197854729,"user":{"login":"niku","id":10890,"avatar_url":"https://avatars.githubusercontent.com/u/10890?v=3","gravatar_id":"","url":"https://api.github.com/users/niku","html_url":"https://github.com/niku","followers_url":"https://api.github.com/users/niku/followers","following_url":"https://api.github.com/users/niku/following{/other_user}","gists_url":"https://api.github.com/users/niku/gists{/gist_id}","starred_url":"https://api.github.com/users/niku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niku/subscriptions","organizations_url":"https://api.github.com/users/niku/orgs","repos_url":"https://api.github.com/users/niku/repos","events_url":"https://api.github.com/users/niku/events{/privacy}","received_events_url":"https://api.github.com/users/niku/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T12:22:49Z","updated_at":"2016-03-17T12:22:49Z","body":"Hi, I'm digging deeper.\r\n\r\nI rewrite `ExrmDeb.Utils.root` to:\r\n\r\n```ex\r\n  def root do\r\n    IO.inspect \"** Application.get_all_env(:exrm_deb) => #{inspect Application.get_all_env(:exrm_deb)} **\"\r\n    IO.inspect \"** Application.get_env(:exrm_deb, :root) => #{inspect Application.get_env(:exrm_deb, :root)} **\"\r\n    Application.get_env(:exrm_deb, :root)\r\n  end\r\n```\r\n\r\nAnd, I execute `mix do release --deb` again.\r\n\r\n```\r\n\"** Application.get_all_env(:exrm_deb) => [] **\"\r\n\"** Application.get_env(:exrm_deb, :root) => nil **\"\r\n```\r\n\r\nIt seems `ExrmDeb.Utils.Config.root` returns `nil` in the above environment.\r\nBut I'm not sure why it returns nil :cry: \r\n\r\nHope it helps.\r\n"}}