Skip to content

Commit 64c6a89

Browse files
Prevent deprecation warnings from exporting an invalid image binary (#77)
1 parent a89b17c commit 64c6a89

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/vega_lite/export.ex

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ defmodule VegaLite.Export do
207207
{output, 0} ->
208208
output
209209

210-
{output, code} ->
210+
{_output, code} ->
211211
raise RuntimeError, """
212212
#{fn_name} requires #{command} executable from the vega-lite npm package.
213213
@@ -217,19 +217,15 @@ defmodule VegaLite.Export do
217217
# or in the current directory
218218
npm install vega vega-lite canvas
219219
220-
npm exec failed with (#{code}):
221-
222-
#{output}
220+
npm exec failed with code #{code}. Errors have been logged to standard error
223221
"""
224222
end
225223
end
226224

227225
def run_cmd(script_path, args) do
228-
opts = [stderr_to_stdout: true]
229-
230226
case :os.type() do
231-
{:win32, _} -> System.cmd("cmd", ["/C", script_path | args], opts)
232-
{_, _} -> System.cmd(script_path, args, opts)
227+
{:win32, _} -> System.cmd("cmd", ["/C", script_path | args])
228+
{_, _} -> System.cmd(script_path, args)
233229
end
234230
end
235231
end

0 commit comments

Comments
 (0)