From 5d32221174d25c4e7837e213a6a78f403d8d33a3 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Tue, 17 Jun 2025 11:17:37 -0700 Subject: [PATCH] Git watcher dirs from config --- lib/pandoc.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pandoc.ex b/lib/pandoc.ex index 882d772..9002bb5 100644 --- a/lib/pandoc.ex +++ b/lib/pandoc.ex @@ -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(