]> git.tuebingen.mpg.de Git - gsu.git/commitdiff
gsu_make_tempfile(): Avoid reading an unbound variable. next
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 28 Jul 2016 11:56:05 +0000 (13:56 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 28 Jul 2016 12:14:17 +0000 (14:14 +0200)
If a gsu script

(a) enables the -u option to treat unset variables as
    an error for parameter expansion,
(b) does not set TMPDIR,
(c) calls gsu_make_tempfile(),

gsu_make_tempfile() fails with an "TMPDIR: unbound variable" error.

The code already contains a fallback for this case, so we can use
the :- construct to avoid the error and fall back to /tmp if TMPDIR
is unset or NULL.


No differences found