From 7ad009e1adb16ed88ce6618515d35118a1708a79 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Wed, 11 Dec 2024 18:11:43 -0800
Subject: 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(
--
cgit v1.2.3