Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0268d21

Browse files
committed
Fix unportable shell-script syntax in pg_upgrade's test.sh.
I discovered the hard way that on some old shells, the locution FOO="" unset FOO does not behave the same as FOO=""; unset FOO and in fact leaves FOO set to an empty string. test.sh was inconsistently spelling it different ways on adjacent lines. This got broken relatively recently, in commit c737a2e, so the lack of field reports to date doesn't represent a lot of evidence that the problem is rare.
1 parent 2861e8e commit 0268d21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pg_upgrade/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ mkdir "$logdir"
8383
PGDATABASE=""; unset PGDATABASE
8484
PGUSER=""; unset PGUSER
8585
PGSERVICE=""; unset PGSERVICE
86-
PGSSLMODE="" unset PGSSLMODE
86+
PGSSLMODE=""; unset PGSSLMODE
8787
PGREQUIRESSL=""; unset PGREQUIRESSL
8888
PGCONNECT_TIMEOUT=""; unset PGCONNECT_TIMEOUT
89-
PGHOST="" unset PGHOST
89+
PGHOST=""; unset PGHOST
9090
PGHOSTADDR=""; unset PGHOSTADDR
9191

9292
# Select a non-conflicting port number, similarly to pg_regress.c

0 commit comments

Comments
 (0)