Also simplify the condition branch by early return Closes Homebrew/homebrew#43574. Signed-off-by: Xu Cheng <xucheng@me.com>