If I run this code:
svn_output = %x[svn update /Users/radek/Sites/db2.rft -r 11105 --force ]
puts
puts " output is =#{svn_output}="
I get this result
svn: Working copy '/Users/radek/Sites/db2.rft' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
output is ==
but I want the error message from svn inside the variable svn_output
. Is that possible?
You want to redirect stderr to stdout:
svn_output = %x[svn update /Users/radek/Sites/db2.rft -r 11105 --force 2>&1]
puts
puts " output is =#{svn_output}="
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With