Skip to content

Commit

Permalink
add ensure_repo
Browse files Browse the repository at this point in the history
  • Loading branch information
hoyon committed May 5, 2021
1 parent 9d9cbbf commit e455b2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mix/tasks/familiar.gen.view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ defmodule Mix.Tasks.Familiar.Gen.View do

case OptionParser.parse!(args, strict: @switches) do
{opts, [name]} ->
dir = Path.join(source_repo_priv(hd(repos)), "views")
repo = hd(repos)
ensure_repo(repo, args)
dir = Path.join(source_repo_priv(repo), "views")

{version, contents} = get_version(name, dir, opts)
filename = "#{name}_v#{version}.sql"
Expand Down

0 comments on commit e455b2e

Please sign in to comment.