Closed george-hopkins closed 1 year ago
I am trying to run a command by passing a list of arguments:
iex> :exec.run("echo ok", [:sync, :stdout]) {:ok, [stdout: ["ok\n"]]} iex> :exec.run(["echo", "ok"], [:sync, :stdout]) {:error, [exit_status: 256]}
Is this not supported yet or just a bug (#21)?
You have to give it a full path to the executable if you are using the list notation (see this example):
:exec.run(["/bin/echo", "ok"], [:sync, :stdout]) {:ok, [stdout: ["ok\n"]]}
I am trying to run a command by passing a list of arguments:
Is this not supported yet or just a bug (#21)?