Hello
I created a setup single box which a Debian Buster.
I am trying to execute a command in a box and get its return code printed 
to stdout.

I run "ls; echo $?; ls toto; echo $?" where toto is not present.
On the host, the ouput is:
*content of directory*
0
ls: cannot access 'toto': No such file or directory
2
I get the 2 value because toto is not present.

Then I do "vagrant ssh client -c 'ls; echo $?; ls toto; echo $?'" (toto is 
again not present), and I get the following output:
*content of directory*
0
ls: cannot access 'toto': No such file or directory
0

Why is the return code/status of the second ls 0?

Thank you for your time.
Best regards,
Johan Mazel

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/24b4eaa7-795d-4cbd-b30c-87fe1b9c7307n%40googlegroups.com.

Reply via email to