Skip to content

Commit f6dbba2

Browse files
committed
A couple more script tweaks for clarity
- Because the substitition string after the hyphen is empty, "${VIRTUAL_ENV:-}" and "${VIRTUAL_ENV-}" have the same effect. However, the latter, which this changes it to, expresses the correct idea that the special case being handled is when the variable is unset: in this case, we expand an empty field rather than triggering an error due to set -u. When the variable is set but empty, it already expands to the substitution value, and including that in the special case with ":" is thus misleading. - Continuing in the vein of d18d90a (and 1e0b3f9), this removes another explicit newline by adding another echo command to print the leading blank line before the table.
1 parent c7cdaf4 commit f6dbba2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function suggest_venv() {
1414
printf "HELP: To avoid this error, use a virtual-env with '%s' instead.\n" "$venv_cmd"
1515
}
1616

17-
if test -n "${VIRTUAL_ENV:-}"; then
17+
if test -n "${VIRTUAL_ENV-}"; then
1818
deps=(build twine) # Install twine along with build, as we need it later.
1919
echo "Virtual environment detected. Adding packages: ${deps[*]}"
2020
pip install --quiet --upgrade "${deps[@]}"

check-version.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ head_sha="$(git rev-parse HEAD)"
4141
latest_tag_sha="$(git rev-parse "${latest_tag}^{commit}")"
4242

4343
# Display a table of all the current version, tag, and HEAD commit information.
44-
echo $'\nThe VERSION must be the same in all locations, and so must the HEAD and tag SHA'
44+
echo
45+
echo 'The VERSION must be the same in all locations, and so must the HEAD and tag SHA'
4546
printf '%-14s = %s\n' 'VERSION file' "$version_version" \
4647
'changes.rst' "$changes_version" \
4748
'Latest tag' "$latest_tag" \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy