Closed nikitalocalhost closed 1 day ago
For some reason there's two evocations of Igniter.Project.Module.move_files/2
per mix igniter.move_files
: one with [move_all?: true]
, which resolves correctly, and one with []
, which i think overwrites location
Edit: second evocation from Igniter.prepare_for_write/1
, which is used in Igniter.do_or_dry_run/1
, which is used in Igniter.Mix.Task.run/1
When I add move_all?: true
to evocation of Igniter.Project.Module.move_files/2
in Igniter.prepare_for_write/1
issue is solved
I think it comes down to this boolean logic here. I admit that I'm not fully following it, so we may need to wait for @zachdaniel to return from vacation! (Which I believe is soonish.)
Describe the bug When using
module_location: :inside_matching_folder
and project module location is outside folder ,mix igniter.move_files
moves modules to correct location, and when project module location is inside folder it moves modules back outsideTo Reproduce
mix igniter.new bug
cd bug
mix igniter.setup
sed -i 's/outside/inside/' .igniter.exs
mkdir lib/bug
mix igniter.move_files
mix igniter.move_files
Repo: https://github.com/nikitalocalhost/igniter-move-files-bug-demo
Expected behavior After first
mix igniter.move_files
repeating it would not propose to move filesRuntime
1.17.3 (compiled with Erlang/OTP 27)
27.0.1
Gentoo Linux 2.17
0.4.7