2f9c84a From: Andrej Manduch <amanduch@redhat.com>

Authored and Committed by pbrobinson 3 years ago
    From: Andrej Manduch <amanduch@redhat.com>
    
    in case sudo is not able to authentificate user `sudo whoami` doesn't
    returrn anything and [ $(sudo whoami) != "root" ] will trigger error.
    
    Reproducer of previous behaviour:
    
    ./arm-image-installer
    [sudo] password for burlak:
    sudo: 3 incorrect password attempts
    ./arm-image-installer: line 42: [: !=: unary operator expected
    
    Usage: arm-image-installer <options>
    
    Fixed behaviour:
    
    ./arm-image-installer
    [sudo] password for burlak:
    sudo: 3 incorrect password attempts
    Error: This script requires 'sudo' privileges in order to write to disk
    & mount media.
    
    Signed-off-by: Andrej Manduch <amanduch@gmail.com>
    Tested-by: Peter Robinson <pbrobinson@fedoraproject.org>
    
        
file modified
+1 -1