Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-12-05 14:51:31 -0800
committerCatalin Mititiuc <webdevcat@proton.me>2024-12-05 14:51:31 -0800
commitc9cc0ed856cb5066751613a23ffea6cff0ec960b (patch)
treee151ed622b40b55fe49d86159c4b0554af3af757
parent6fc8e8ec192051938da4d31459698d55b1e40ea2 (diff)
Take watch dirs as an argument
-rw-r--r--lib/pandoc.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pandoc.ex b/lib/pandoc.ex
index 1c3970d..ec5ce70 100644
--- a/lib/pandoc.ex
+++ b/lib/pandoc.ex
@@ -3,7 +3,7 @@ defmodule Pandoc do
Documentation for `Pandoc`.
"""
- def run(profile, ["--watch"]) do
+ def run(profile, ["--watch" | dirs]) do
IO.puts("""
Pandoc watcher starting, env: #{Application.get_env(:pandoc, profile) |> inspect(pretty: true)}
@@ -12,7 +12,7 @@ defmodule Pandoc do
ref =
__MODULE__.Supervisor
|> Supervisor.start_child(
- Supervisor.child_spec({Pandoc.Watcher, [profile, dirs: ["documents"]]},
+ Supervisor.child_spec({Pandoc.Watcher, [profile, dirs: dirs]},
restart: :transient,
id: __MODULE__.Watcher
)