mercredi 20 février 2019

Retrieving exit status value from executable in Ruby with Open3

Launching

stdout, status = Open3.capture2("ls")
if (status == 0)
  puts("PASS")
else
  puts("FAIL")

works like a charm, however when I try to use

stdout, status = Open3.capture2("../src/bin tests/test01.txt")

to launch an executable bin with his argument's path (which works from my command line, I checked with echo $?), it seems to enter an infinite loop. I tried capture3 and popen3, same thing.

Any idea about what could be wrong?

Aucun commentaire:

Enregistrer un commentaire