summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-05-18 09:06:54 +0200
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-07-14 16:47:26 +0200
commit6193d59d5df9caf16d5bfacfb0b1776dd7cc3cca (patch)
treeb3dd066f9ece8719436deec8f9549bff74868c07
parentfa0ac5f24b93f7302e44d264cc541d98eeca3592 (diff)
downloadspack-6193d59d5df9caf16d5bfacfb0b1776dd7cc3cca.tar.gz
spack-6193d59d5df9caf16d5bfacfb0b1776dd7cc3cca.tar.bz2
spack-6193d59d5df9caf16d5bfacfb0b1776dd7cc3cca.tar.xz
spack-6193d59d5df9caf16d5bfacfb0b1776dd7cc3cca.zip
Compiler wrapper: fix globbing and debug out.log bell chars (#30699)
* Disable globbing * Split on bell char when dumping cmd to out.log
-rwxr-xr-xlib/spack/env/cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index c498db0583..9938c6368c 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -f
# shellcheck disable=SC2034 # evals in this script fool shellcheck
#
# Copyright 2013-2021 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