Skip to content

Commit

Permalink
Do not render progress bars when SH installers are run with -b (bat…
Browse files Browse the repository at this point in the history
…ch) (#757)

* set CONDA_QUIET to the value of $BATCH

* add news
  • Loading branch information
jaimergp authored Feb 29, 2024
1 parent ee71814 commit 04f0795
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
7 changes: 6 additions & 1 deletion constructor/header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,14 @@ fi
# the second binary payload: the tarball of packages
printf "Unpacking payload ...\n"
extract_range $boundary1 $boundary2 | \
"$CONDA_EXEC" constructor --extract-tarball --prefix "$PREFIX"
CONDA_QUIET="$BATCH" "$CONDA_EXEC" constructor --extract-tarball --prefix "$PREFIX"

PRECONDA="$PREFIX/preconda.tar.bz2"
CONDA_QUIET="$BATCH" \
"$CONDA_EXEC" constructor --prefix "$PREFIX" --extract-tarball < "$PRECONDA" || exit 1
rm -f "$PRECONDA"

CONDA_QUIET="$BATCH" \
"$CONDA_EXEC" constructor --prefix "$PREFIX" --extract-conda-pkgs || exit 1

#The templating doesn't support nested if statements
Expand Down Expand Up @@ -495,6 +497,7 @@ CONDA_SAFETY_CHECKS=disabled \
CONDA_EXTRA_SAFETY_CHECKS=no \
CONDA_CHANNELS="__CHANNELS__" \
CONDA_PKGS_DIRS="$PREFIX/pkgs" \
CONDA_QUIET="$BATCH" \
"$CONDA_EXEC" install --offline --file "$PREFIX/pkgs/env.txt" -yp "$PREFIX" $shortcuts || exit 1
rm -f "$PREFIX/pkgs/env.txt"

Expand Down Expand Up @@ -539,6 +542,7 @@ for env_pkgs in "${PREFIX}"/pkgs/envs/*/; do
CONDA_EXTRA_SAFETY_CHECKS=no \
CONDA_CHANNELS="$env_channels" \
CONDA_PKGS_DIRS="$PREFIX/pkgs" \
CONDA_QUIET="$BATCH" \
"$CONDA_EXEC" install --offline --file "${env_pkgs}env.txt" -yp "$PREFIX/envs/$env_name" $env_shortcuts || exit 1
rm -f "${env_pkgs}env.txt"
done
Expand All @@ -547,6 +551,7 @@ done
__INSTALL_COMMANDS__

POSTCONDA="$PREFIX/postconda.tar.bz2"
CONDA_QUIET="$BATCH" \
"$CONDA_EXEC" constructor --prefix "$PREFIX" --extract-tarball < "$POSTCONDA" || exit 1
rm -f "$POSTCONDA"
rm -rf "$PREFIX/install_tmp"
Expand Down
19 changes: 19 additions & 0 deletions news/757-progress-bars
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* Do not render progress bars when SH installers are run with `-b` (batch). (#756 via #757)

### Bug fixes

* <news item>

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>

0 comments on commit 04f0795

Please sign in to comment.