Skip to content

Commit

Permalink
fix: use original file's extname when moving files always
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Nov 27, 2024
1 parent 6d9d172 commit 4585581
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/igniter/project/module.ex
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ defmodule Igniter.Project.Module do
module when not is_nil(module) <- to_module_name(module),
new_path when not is_nil(new_path) <-
should_move_file_to(igniter, source, module, module_location_config, opts) do
new_path = Path.rootname(new_path) <> Path.extname(source.path)
Igniter.move_file(igniter, source.path, new_path, error_if_exists?: false)
else
_ ->
Expand Down

0 comments on commit 4585581

Please sign in to comment.