You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Windows Server 2007, 32bit
OTP: 18.3
Porcelain: 2.0
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: