Skip to content
Snippets Groups Projects
Commit 47b71644 authored by Stephen Warren's avatar Stephen Warren Committed by Tom Rini
Browse files

fs-test.sh: fix pre-requisite detection


In the following snippet:

if [ ! -x `which $prereq` ]; then

When $prereq does not exist, `which $prereq` evaluates to the empty string,
which results in *no* argument being passed to the -x operator, which then
evaluates to true, which is the equivalent of the prereq having been found. In
order for this to fail as expected, we must pass an empty argument, which then
causes -x to fail. Do this by wrapping the `` in quotes so there's always an
argument to -x, even if the value of the argument is zero-length.

Signed-off-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Tested-by: default avatarSimon Glass <sjg@chromium.org>
parent 4a282742
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment