index : pandoc | |
Hex package with a file-watcher and Mix task for using Pandoc to convert Markdown files to HTML. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-12-11 16:59:15 -0800 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-12-11 16:59:15 -0800 |
commit | 9e8392a939825a8920004922d51b123b1a92b6b9 (patch) | |
tree | 5ac4028d1838275ae1b917d72852e8f5e5fd7842 /lib/pandoc.ex | |
parent | 9d9a9bb13e99332a1fbe65d807b83bd1824eda5f (diff) |
Get path from config in mix task
Diffstat (limited to 'lib/pandoc.ex')
-rw-r--r-- | lib/pandoc.ex | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/pandoc.ex b/lib/pandoc.ex index 57606da..882d772 100644 --- a/lib/pandoc.ex +++ b/lib/pandoc.ex @@ -23,7 +23,7 @@ defmodule Pandoc do end end - def run(profile, extra_args) do + def run(profile, path) do config = Application.get_env(:pandoc, profile) args = config[:args] || [] @@ -33,8 +33,6 @@ defmodule Pandoc do stderr_to_stdout: true ] - [path] = extra_args - args = List.update_at(args, -1, fn v -> Path.join( @@ -46,6 +44,6 @@ defmodule Pandoc do ) end) - "pandoc" |> System.cmd(args ++ extra_args, opts) |> elem(1) + "pandoc" |> System.cmd(args ++ [path], opts) |> elem(1) end end |