Quote arguments where needs be, in debug logs

Before, looks like that:

    RUNNING: build-simple-cdd --verbose --debug --force-root
    --conf simple-cdd.conf --dist kali-rolling
    --debian-mirror http://kali.download/kali/
    --profiles kali offline
    --auto-profiles kali offline

After, looks like that:

    RUNNING: build-simple-cdd --verbose --debug --force-root
    --conf simple-cdd.conf --dist kali-rolling
    --debian-mirror http://kali.download/kali/
    --profiles 'kali offline'
    --auto-profiles 'kali offline'
master
Arnaud Rebillout 3 months ago
parent 56fb4a09c3
commit 56873621bd
No known key found for this signature in database
GPG Key ID: E725E87914600216

@ -94,7 +94,11 @@ failure() {
run_and_log() {
if [ -n "$VERBOSE" ] || [ -n "$DEBUG" ]; then
echo "RUNNING: $@" >&2
printf "RUNNING:" >&2
for _ in "$@"; do
[[ $_ =~ [[:space:]] ]] && printf " '%s'" "$_" || printf " %s" "$_"
done >&2
printf "\n" >&2
"$@" 2>&1 | tee -a "$BUILD_LOG"
else
"$@" >>"$BUILD_LOG" 2>&1

Loading…
Cancel
Save