Skip to content

Commit

Permalink
show-changes: Fix excessive quoting
Browse files Browse the repository at this point in the history
Single quotes inside a line like below are treated as a part of the
value:

: "${foo:='bar'}"

If foo is empty or unset then it will be set to "'bar'", instead of
just "bar". This resulted in the script complaining that git can't
operate on directory "'scripts'".
  • Loading branch information
krnowak committed Sep 29, 2023
1 parent aff4340 commit 99aeeed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions show-changes
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ if [ $# -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
exit 1
fi

: "${SCRIPTS_REPO:='scripts'}"
: "${COREOS_OVERLAY_REPO:='coreos-overlay'}"
: "${PORTAGE_STABLE_REPO:='portage-stable'}"
: "${SCRIPTS_REPO:=scripts}"
: "${COREOS_OVERLAY_REPO:=coreos-overlay}"
: "${PORTAGE_STABLE_REPO:=portage-stable}"

OLD="$1"
NEW="${2-HEAD}"
Expand Down

0 comments on commit 99aeeed

Please sign in to comment.