Skip to content
New issue

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

Porcelain.spawn_shell error on windows #25

Open
amitk75 opened this issue Jul 20, 2016 · 1 comment
Open

Porcelain.spawn_shell error on windows #25

amitk75 opened this issue Jul 20, 2016 · 1 comment

Comments

@amitk75
Copy link

amitk75 commented Jul 20, 2016

Hi,

I am using Porcelain.spawn_shell to execute certain commands on windows. Below is the code sample from a Phoenix application using websockets:
Porcelain.spawn_shell("ping -n 5 -i 10 1.1.1.1", in: "", out: {:send, self()})

I am getting error on windows. Same code works fine on linux though...
** (ArgumentError) argument error
:erlang.++("C:\Windows\system32\cmd.exe", '.exe')
(kernel) os.erl:146: :os.verify_executable/3
(kernel) os.erl:126: :os.find_executable/2
(porcelain) lib/porcelain/drivers/basic_driver.ex:103: Porcelain.Driver.Basic.find_executable/2
(porcelain) lib/porcelain/drivers/basic_driver.ex:53: Porcelain.Driver.Basic.do_exec/4
(porcelain) lib/porcelain.ex:273: Porcelain.catch_throws/1

Porcelain.spawn is working with some code changes. I am not sure if there is some issue with my code or Porcelain (or something else). Also, what is the difference between spawn and spawn_shell?

Versions:

  1. Windows Server 2007, 32bit
  2. OTP: 18.3
  3. Porcelain: 2.0
@alco
Copy link
Owner

alco commented Jul 21, 2016

Hi. Could you try using the master branch and see if it fixes the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants