File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,13 @@ defmodule Mix.Tasks.Compile.App do
189189 Mix.Project . ensure_structure ( )
190190 File . write! ( target , IO . chardata_to_string ( contents ) )
191191 File . touch! ( target , new_mtime )
192+
193+ # If we just created the .app file, it will have touched
194+ # the directory mtime, so we need to reset it.
195+ if current_properties == [ ] do
196+ File . touch! ( compile_path , new_mtime )
197+ end
198+
192199 Mix . shell ( ) . info ( "Generated #{ app } app" )
193200 { :ok , [ ] }
194201 else
Original file line number Diff line number Diff line change @@ -66,8 +66,6 @@ defmodule Mix.Tasks.Compile.AppTest do
6666 test "generates .app file when changes happen" do
6767 in_fixture ( "no_mixfile" , fn ->
6868 Mix.Project . push ( MixTest.Case.Sample )
69- # Pre-create the compilation path to avoid mtime races
70- File . mkdir_p ( Mix.Project . compile_path ( ) )
7169
7270 Mix.Tasks.Compile.Elixir . run ( [ ] )
7371 assert Mix.Tasks.Compile.App . run ( [ ] ) == { :ok , [ ] }
@@ -256,8 +254,6 @@ defmodule Mix.Tasks.Compile.AppTest do
256254 test ".app contains description and registered (as required by systools)" do
257255 in_fixture ( "no_mixfile" , fn ->
258256 Mix.Project . push ( MixTest.Case.Sample )
259- # Pre-create the compilation path to avoid mtime races
260- File . mkdir_p ( Mix.Project . compile_path ( ) )
261257
262258 Mix.Tasks.Compile.Elixir . run ( [ ] )
263259 assert Mix.Tasks.Compile.App . run ( [ ] ) == { :ok , [ ] }
You can’t perform that action at this time.
0 commit comments