guider icon indicating copy to clipboard operation
guider copied to clipboard

Fix specifications of exit codes for the Guider launcher

Open elfring opened this issue 4 years ago • 1 comments

I suggest to correct two places in the Guider launcher script.

  • A)

                    echo "[Error] fail to find python"
                    exit
    

    The bash manual provides the following information.

                  … If n is omitted, the exit status is that of the last command executed. …
    

    I doubt that the exit status from a successful execution of an echo command (for an error message) is appropriate here. Thus I would prefer to use exit 1 instead.

  • B)

    $PYTHON -m guider $*
    
    exit 0
    

    I would prefer that an erroneous execution of the Guider program call will be indicated by a corresponding error code. Would you like to delete the statement “exit 0” then?

elfring avatar Sep 26 '21 13:09 elfring

I agree with you :)

iipeace avatar Sep 27 '21 11:09 iipeace