Skip to content

Commit

Permalink
Merge pull request #4468 from Ma27/installer-no-progress-opt
Browse files Browse the repository at this point in the history
scripts/install-nix-from-closure: only show progress if a terminal is used
  • Loading branch information
edolstra authored Jan 25, 2021
2 parents b7bfc7e + d9367a2 commit 29edbfe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/install-nix-from-closure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,15 @@ fi
mkdir -p $dest/store

printf "copying Nix to %s..." "${dest}/store" >&2
# Insert a newline if no progress is shown.
if [ ! -t 0 ]; then
echo ""
fi

for i in $(cd "$self/store" >/dev/null && echo ./*); do
printf "." >&2
if [ -t 0 ]; then
printf "." >&2
fi
i_tmp="$dest/store/$i.$$"
if [ -e "$i_tmp" ]; then
rm -rf "$i_tmp"
Expand Down

0 comments on commit 29edbfe

Please sign in to comment.