aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/build-support/rust/build-rust-crate/log.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/build-support/rust/build-rust-crate/log.nix')
-rw-r--r--nixpkgs/pkgs/build-support/rust/build-rust-crate/log.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/build-support/rust/build-rust-crate/log.nix b/nixpkgs/pkgs/build-support/rust/build-rust-crate/log.nix
index a7e2cb4f463..9054815f4a1 100644
--- a/nixpkgs/pkgs/build-support/rust/build-rust-crate/log.nix
+++ b/nixpkgs/pkgs/build-support/rust/build-rust-crate/log.nix
@@ -1,23 +1,23 @@
{ lib }:
let echo_colored_body = start_escape:
- # Body of a function that behaves like "echo" but
+ # Body of a function that behaves like "echo" but
# has the output colored by the given start_escape
# sequence. E.g.
#
# * echo_x "Building ..."
# * echo_x -n "Running "
#
- # This is more complicated than apparent at first sight
+ # This is more complicated than apparent at first sight
# because:
# * The color markers and the text must be print
# in the same echo statement. Otherise, other
- # intermingled text from concurrent builds will
+ # intermingled text from concurrent builds will
# be colored as well.
# * We need to preserve the trailing newline of the
# echo if and only if it is present. Bash likes
# to strip those if we capture the output of echo
- # in a variable.
+ # in a variable.
# * Leading "-" will be interpreted by test as an
# option for itself. Therefore, we prefix it with
# an x in `[[ "x$1" =~ ^x- ]]`.
@@ -27,13 +27,13 @@ let echo_colored_body = start_escape:
echo_args+=" $1"
shift
done
-
+
local start_escape="$(printf '${start_escape}')"
local reset="$(printf '\033[0m')"
echo $echo_args $start_escape"$@"$reset
'';
echo_conditional_colored_body = colors: start_escape:
- if colors == "always"
+ if colors == "always"
then (echo_colored_body start_escape)
else ''echo "$@"'';
in {
@@ -50,7 +50,7 @@ in {
noisily = colors: verbose: ''
noisily() {
${lib.optionalString verbose ''
- echo_colored -n "Running "
+ echo_colored -n "Running "
echo $@
''}
$@