Compiler wrapper: fix globbing and debug out.log bell chars (#30699)

* Disable globbing

* Split on bell char when dumping cmd to out.log
This commit is contained in:
Harmen Stoppels 2022-05-18 09:06:54 +02:00 committed by GitHub
parent 51fa8e7b5e
commit 1185eb9199
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
lib/spack/env/cc vendored
View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -f
# shellcheck disable=SC2034 # evals in this script fool shellcheck
#
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
@ -768,7 +768,9 @@ if [ "$SPACK_DEBUG" = TRUE ]; then
input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log"
output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log"
echo "[$mode] $command $input_command" >> "$input_log"
echo "[$mode] ${full_command_list}" >> "$output_log"
IFS="$lsep"
echo "[$mode] "$full_command_list >> "$output_log"
unset IFS
fi
# Execute the full command, preserving spaces with IFS set