Scala sys.process nonzero exit values

On comparing different files import sys.process._" "diff data.txt myFile.txt" ! the exit code proves nonzero as expected, < 1 --- > 123 res1: Int = 1 However on trying to gather the actual