openSUSE / microos-toolbox

Script to run a toolbox container on openSUSE MicroOS
Apache License 2.0
54 stars 15 forks source link

Script exits when using -c even if no option -t is given complaining about -c and -t not being allowed together #19

Closed g7fernandes closed 3 years ago

g7fernandes commented 3 years ago

When the container name is given, it checks if there is something assigned to TAG to check if the option -t was used. However, something is assigned to TAG when the -t is used. The -z should be a -n.

            -c|--container)
                if [ -z "$TAG" ]; then
                    echo "ERROR: Don't use both -c and -t!"
                    show_help
                    exit 1
                fi
                CHANGE_NAME="true"
                TOOLBOX_NAME="$2"
                shift 2
                ;;

https://github.com/kubic-project/microos-toolbox/blob/a720b251d2e23c312aa02b9ada77649eb9e4481b/toolbox#L285

jlausuch commented 3 years ago

I have observed the same behaviour.

thkukuk commented 3 years ago

Should be fixed now.