frontend: do no try to look for sub-commands in the PATH
This is a recipe for disaster and it actually already fails when you pass something that looks like a long option as first argument because $(which --long-option) will produce an "Illegal option" string on its standard output. $ lb --debug config --archive-areas "main contrib non-free" Illegal option -- /usr/bin/lb: 54: [: Usage:: unexpected operator E: Unknown command: --debug
This commit is contained in:
parent
10bbb095a8
commit
440c0b7738
|
@ -40,9 +40,6 @@ elif [ -x "local/live-build/scripts/build/${COMMAND}" ]; then
|
|||
elif [ -x /usr/lib/live/build/${COMMAND} ]; then
|
||||
# User has live-build installed in the system
|
||||
SCRIPT=/usr/lib/live/build/"${COMMAND}"
|
||||
elif [ $(which "${COMMAND}") ]; then
|
||||
# User has live-build commands in path
|
||||
SCRIPT="${COMMAND}"
|
||||
else
|
||||
Echo_error "Unknown command: ${COMMAND}"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue