escape INSTALL_BASE properly for EUMM to parse
Graham Knop [Mon, 3 Aug 2020 10:57:17 +0000 (12:57 +0200)]
t/generated_app.t

index d83032e..30b2fce 100644 (file)
@@ -23,8 +23,14 @@ my $instdir = tempdir(CLEANUP => 1);
 
 my $MAKE = $Config{make} || 'make';
 
-$ENV{PERL_MM_OPT} = "INSTALL_BASE=$instdir";
-$ENV{INSTALL_BASE} = $instdir;
+my $escaped_path = $instdir;
+$escaped_path =~ s/\\/\\\\/g;
+if ($escaped_path =~ s/ /\\ /g) {
+  $escaped_path = qq{"$escaped_path"};
+}
+
+$ENV{PERL_MM_OPT} = "INSTALL_BASE=$escaped_path";
+
 if ($ENV{MAKEFLAGS}) {
     $ENV{MAKEFLAGS} =~ s/PREFIX=[^\s]+//;
     $ENV{MAKEFLAGS} =~ s/INSTALL_BASE=[^\s]+//;