File: avoid-harmless-tmp-warning

package info (click to toggle)
libsvn-class-perl 0.18-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 144 kB
  • sloc: perl: 340; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Description: avoid a harmless undef warning on tmp stuff
 Just test $NEV{TMPDIR} before using a regexp. Note that tests correctly use File::Temp.
Author: dod
--- a/t/01-svn.t
+++ b/t/01-svn.t
@@ -13,7 +13,7 @@
 # create a repos
 #
 # Mac OSX 10.5 workaround
-if ($ENV{TMPDIR} =~ m/\w+\+/) {
+if (defined $ENV{TMPDIR} and $ENV{TMPDIR} =~ m/\w+\+/) {
     $ENV{TMPDIR} = '/tmp';
 }