All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: grub-devel@gnu.org
Subject: Commands not executed in the else branch
Date: Mon, 27 Apr 2009 00:52:19 -0400	[thread overview]
Message-ID: <1240807939.4158.35.camel@ct> (raw)

Hello!

While testing the new "test" command, I have found that the "else"
branch is not executed in some cases.  "echo" and "set" are executed,
but other commands are not.  Even "hello" is not working.  The problem
is not specific to the "test" command.  I can do it with "search" as
well:

grub> if search -f /; then echo 0; else hello; fi
error: no such device
grub> if search -f /; then echo 0; else echo Hello World; fi
Hello World
error: no such device
grub> if search -f /; then echo 0; else echo 1; hello; echo 2; fi
1
2
error: no such device
grub>

The problem disappears after there is a true condition in the "if" part.

-- 
Regards,
Pavel Roskin



             reply	other threads:[~2009-04-27  4:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27  4:52 Pavel Roskin [this message]
2009-04-27  6:15 ` Commands not executed in the else branch Bean
2009-04-27 14:10   ` Pavel Roskin
2009-05-03  6:49     ` Bean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1240807939.4158.35.camel@ct \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.