It looks like it is not possible to abort a menuentry content, for example:
submenu test1 {
menuentry test2 {
echo "play1"
cmd1 # even this failed, it still continue to next line
echo "play2"
return 1 # this also does not work
exit # this works but it exit the entire grub
echo "play3"
}
}
What I want is similar to set -e
in bash, but only return to previous menu. How can I achieve this?