aboutsummaryrefslogtreecommitdiffstats
path: root/tests/nixos-rebuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nixos-rebuild.sh')
-rwxr-xr-xtests/nixos-rebuild.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/nixos-rebuild.sh b/tests/nixos-rebuild.sh
index 9e2e47e..ec0c85c 100755
--- a/tests/nixos-rebuild.sh
+++ b/tests/nixos-rebuild.sh
@@ -1,8 +1,10 @@
#! /bin/sh
-# Stands in for nixos-rebuild: records the user it runs as, NIX_PATH, and its
-# arguments in /tmp/nixos-rebuild.log.
+# Stands in for nixos-rebuild: records the user it runs as, NIX_PATH, its
+# arguments, and whether its output is a terminal in /tmp/nixos-rebuild.log.
+if test -t 1; then terminal=terminal; else terminal='no terminal'; fi
{
id -u
printf '%s\n' "${NIX_PATH-}"
printf '%s\n' "$*"
+ echo "$terminal"
} > /tmp/nixos-rebuild.log