From 440c0b7738cbbcd2fa2dd948ab201d40e23db074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Thu, 23 Apr 2020 22:26:52 +0200 Subject: [PATCH] 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 --- frontend/lb | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/lb b/frontend/lb index 08aae45a2..67261a0aa 100755 --- a/frontend/lb +++ b/frontend/lb @@ -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