Opened 17 years ago

Last modified 16 years ago

#14452 closed enhancement

python_select produce unneeded warnings when the only option is "-n" — at Initial Version

Reported by: ebgssth@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: gcc_select python_select select.sh Cc: raimue (Rainer Müller), mww@…
Port:

Description

$ python_select -n
/opt/local/bin/python_select: line 83: [: ==: unary operator expected
/opt/local/bin/python_select: line 83: [: ==: unary operator expected
/opt/local/bin/python_select: line 83: [: ==: unary operator expected
/opt/local/bin/python_select: line 83: [: ==: unary operator expected
version "" is invalid!

easy fix would be

-                 if [ ${1} == ${version} ]; then
+                if [ x${1} == x${version} ]; then

might be better to stop script when python_select called with -n only

Change History (1)

Changed 17 years ago by ebgssth@…

Attachment: select.sh.diff added
Note: See TracTickets for help on using tickets.