diff options
author | Raphaël Hertzog <raphael@offensive-security.com> | 2020-04-23 22:26:52 +0200 |
---|---|---|
committer | Raphaël Hertzog <raphael@offensive-security.com> | 2020-04-23 22:30:43 +0200 |
commit | 440c0b7738cbbcd2fa2dd948ab201d40e23db074 (patch) | |
tree | 6faeb7ccae7c6938f4550424b366535768362f47 /frontend | |
parent | 10bbb095a8bab26a91288f737d464c4d025d8682 (diff) | |
download | vyos-live-build-440c0b7738cbbcd2fa2dd948ab201d40e23db074.tar.gz vyos-live-build-440c0b7738cbbcd2fa2dd948ab201d40e23db074.zip |
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
Diffstat (limited to 'frontend')
-rwxr-xr-x | frontend/lb | 3 |
1 files changed, 0 insertions, 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 |