Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b7bfc7ee52dd
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 29edbfe2d257
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 22, 2021

  1. scripts/install-nix-from-closure: only show progress if a terminal is…

    … used
    
    While the progress dots during the copying of the store work fine on a
    normal terminal, those look pretty off if the script is run inside a
    provisioning script of e.g. `vagrant` or `packer` where `stderr` and
    `stdout` are captured:
    
        default: .
        default: ..
        default: .
        default: .
        default: .
    
    To work around this, the script checks with `-t 0` if it's
    running on an actual terminal and doesn't show the progress if that's not
    the case.
    Ma27 committed Jan 22, 2021

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Ma27 Maximilian Bosch
    Copy the full SHA
    d9367a2 View commit details

Commits on Jan 25, 2021

  1. Merge pull request #4468 from Ma27/installer-no-progress-opt

    scripts/install-nix-from-closure: only show progress if a terminal is used
    edolstra authored Jan 25, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    29edbfe View commit details
Showing with 7 additions and 1 deletion.
  1. +7 −1 scripts/install-nix-from-closure.sh
8 changes: 7 additions & 1 deletion scripts/install-nix-from-closure.sh
Original file line number Diff line number Diff line change
@@ -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"