Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/mix/lib/mix/tasks/compile.app.ex
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ defmodule Mix.Tasks.Compile.App do
:application.load({:application, app, properties})

Mix.Project.ensure_structure()
File.write!(target, [contents, ?.])
File.write!(target, IO.chardata_to_string([contents, ?.]))
File.touch!(target, new_mtime)

# If we just created the .app file, it will have touched
Expand Down
4 changes: 2 additions & 2 deletions lib/mix/test/mix/tasks/compile.app_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ defmodule Mix.Tasks.Compile.AppTest do
test "uses custom application settings" do
in_fixture("no_mixfile", fn ->
Mix.Project.push(CustomProject)
env = [foo: [:one, "two", 3, 4], bar: [{} | %{foo: :bar}]]
env = [foo: [:one, "two", 3, 4, "฿"], bar: [{} | %{foo: :bar}]]

Process.put(:application,
maxT: :infinity,
Expand All @@ -132,7 +132,7 @@ defmodule Mix.Tasks.Compile.AppTest do
assert properties[:applications] ==
[:kernel, :stdlib, :elixir, :logger, :ex_unit, :example_app, :mix]

assert properties[:env] == [foo: [:one, "two", 3, 4], bar: [{} | %{foo: :bar}]]
assert properties[:env] == [foo: [:one, "two", 3, 4, "฿"], bar: [{} | %{foo: :bar}]]

refute Keyword.has_key?(properties, :extra_applications)
end)
Expand Down