Commit 97984f1 1 parent 209830c commit 97984f1 Copy full SHA for 97984f1
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -180,8 +180,10 @@ defmodule PdfGenerator do
180
180
chrome_executable = PdfGenerator.PathAgent . get . chrome_path
181
181
node_executable = PdfGenerator.PathAgent . get . node_path
182
182
disable_sandbox = Application . get_env ( :pdf_generator , :disable_chrome_sandbox ) || options [ :no_sandbox ]
183
- # FIXME: this won't work in releases
184
- js_file = Application . app_dir ( :pdf_generator ) <> "/../../../../node_modules/chrome-headless-render-pdf/dist/cli/chrome-headless-render-pdf.js"
183
+
184
+ # needs `make priv/node_modules` to be run when building
185
+ priv_dir = :code . priv_dir ( :pdf_generator ) |> to_string ( )
186
+ js_file = "#{ priv_dir } /node_modules/chrome-headless-render-pdf/dist/cli/chrome-headless-render-pdf.js"
185
187
186
188
{ executable , executable_args } =
187
189
if options [ :prefer_system_executable ] && is_binary ( chrome_executable ) do
You can’t perform that action at this time.
0 commit comments