We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@type command_option :: lists
@type command_option ::
{:stdout, :stderr | output_device_option} | {:stderr, :stdout | output_device_option} |
but neither stderr: :stdout or stdout: :stderr work; e.g.
stderr: :stdout
stdout: :stderr
Exexec.run(["/usr/bin/ssh" | args], stdout: true, stderr: :stdout, sync: true, env: env)
yields
** (FunctionClauseError) no function clause matching in Exexec.ToErl.output_device_option_to_erl/1 (exexec) lib/exexec/to_erl.ex:76: Exexec.ToErl.output_device_option_to_erl(:stdout) (exexec) lib/exexec/to_erl.ex:72: Exexec.ToErl.command_option_to_erl/2 (exexec) lib/exexec/to_erl.ex:14: anonymous fn/2 in Exexec.ToErl.command_options_to_erl/1 (elixir) lib/enum.ex:1774: Enum."-reduce/3-lists^foldl/2-0-"/3 (exexec) lib/exexec/to_erl.ex:13: Exexec.ToErl.command_options_to_erl/1 (exexec) lib/exexec.ex:125: Exexec.run/2 [...]
This fixes it, but I don't know if it's the right place to fix it:
diff --git a/lib/exexec/to_erl.ex b/lib/exexec/to_erl.ex index 0abf38c..444d79f 100644 --- a/lib/exexec/to_erl.ex +++ b/lib/exexec/to_erl.ex @@ -76,6 +76,8 @@ defmodule Exexec.ToErl do def output_device_option_to_erl(:null), do: :null def output_device_option_to_erl(:close), do: :close def output_device_option_to_erl(:print), do: :print + def output_device_option_to_erl(:stdin), do: :stdin + def output_device_option_to_erl(:stdout), do: :stdout def output_device_option_to_erl(path) when is_binary(path), do: to_char_list(path) def output_device_option_to_erl(pid) when is_pid(pid), do: pid def output_device_option_to_erl(fun) when is_function(fun, 3), do: fun
The text was updated successfully, but these errors were encountered:
@ericentin I'm considering to use exexec and this issue seems to be a real thing, as well as #3 . Do you have time to address them?
Sorry, something went wrong.
Should be fixed.
No branches or pull requests
@type command_option ::
listsbut neither
stderr: :stdout
orstdout: :stderr
work; e.g.yields
This fixes it, but I don't know if it's the right place to fix it:
The text was updated successfully, but these errors were encountered: