Add quotes around file name

$input_log will expand to file names with special characters (e.g. "@"), thus bash requires quotes.
This commit is contained in:
Erik Schnetter 2016-06-08 19:14:01 -04:00
parent 30e8e77fb6
commit 2a4d440003

4
lib/spack/env/cc vendored
View File

@ -324,8 +324,8 @@ fi
if [[ $SPACK_DEBUG == TRUE ]]; then if [[ $SPACK_DEBUG == TRUE ]]; then
input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log" input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log"
output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log" output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log"
echo "[$mode] $command $input_command" >> $input_log echo "[$mode] $command $input_command" >> "$input_log"
echo "[$mode] ${full_command[@]}" >> $output_log echo "[$mode] ${full_command[@]}" >> "$output_log"
fi fi
exec "${full_command[@]}" exec "${full_command[@]}"