runVM: check exit code before postVM eval

This commit is contained in:
Nikolay Amiantov 2016-09-04 16:42:26 +03:00
parent f4443bb9ef
commit 8b38b6aae2

View File

@ -261,9 +261,12 @@ rec {
exit 1 exit 1
fi fi
eval "$postVM" exitCode="$(cat xchg/in-vm-exit)"
if [ "$exitCode" != "0" ]; then
exit "$exitCode"
fi
exit $(cat xchg/in-vm-exit) eval "$postVM"
''; '';