As documented, the as() function should only create a subshell
to execute the provided command when a command is present. Correct
the implementation to check for the presence of the command parameter
instead of the sandbox name (which is always present in current
usage).
Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
# "as $1 COMMAND..." sets those variables in a subshell and invokes COMMAND
# there.
as() {
- if test "X$1" != X; then
+ if test "X$2" != X; then
(ovs_setenv $1; shift; $@)
else
ovs_setenv $1