Skip to content

Commit

Permalink
Use a more natural argument order for generate/3
Browse files Browse the repository at this point in the history
  • Loading branch information
jparise committed May 28, 2016
1 parent f0bd731 commit 576e768
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mix/tasks/compile.thrift.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defmodule Mix.Tasks.Compile.Thrift do
unless Enum.empty?(stale_files) do
File.mkdir_p!(output_dir)
options = build_options(output_dir, thrift_options)
Enum.each stale_files, &generate(&1, thrift_executable, options)
Enum.each stale_files, &generate(thrift_executable, options, &1)
end
end

Expand Down Expand Up @@ -87,7 +87,7 @@ defmodule Mix.Tasks.Compile.Thrift do
opts ++ user_options
end

defp generate(thrift_file, exec, options) do
defp generate(exec, options, thrift_file) do
args = options ++ [thrift_file]
case System.cmd(exec, args) do
{_, 0} -> Mix.shell.info "Compiled #{thrift_file}"
Expand Down

0 comments on commit 576e768

Please sign in to comment.