Git watcher dirs from config

This commit is contained in:
Catalin Constantin Mititiuc 2024-12-11 18:11:43 -08:00
parent 192d65a059
commit 7ad009e1ad

View File

@ -3,7 +3,11 @@ defmodule Pandoc do
Documentation for `Pandoc`.
"""
def run(profile, ["--watch" | dirs]) do
def run(profile, ["--watch" | _]) do
config = Application.get_env(:pandoc, profile)
opts = [cd: config[:cd] || File.cwd!()]
dirs = [opts[:cd], Path.join(opts[:cd], "_drafts")]
ref =
__MODULE__.Supervisor
|> Supervisor.start_child(