From bdbc12f06898a73c4136cf92752725c8449c8d06 Mon Sep 17 00:00:00 2001
From: Andreas Romeyke <andreas.romeyke@slub-dresden.de>
Date: Mon, 18 Nov 2024 09:32:32 +0100
Subject: [PATCH] - fixed ENV setting if called within Dist::Zilla

---
 t/02-init.t | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/t/02-init.t b/t/02-init.t
index 2401a01..b501882 100644
--- a/t/02-init.t
+++ b/t/02-init.t
@@ -4,10 +4,12 @@ use Test::Cmd;
 use Test::More tests =>6;
 use Test::TA;
 use Path::Tiny;
-$ENV{'TEST_ACTIVE'}=1;
-delete $ENV{PERL_MM_USE_DEFAULT};
 my $testapp = Test::TA::testapp();
-local $ENV{'HOME'} = $testapp->workpath();
+if ( $ENV{_} !~ /dzil/) { # patch if not dzil
+    $ENV{'TEST_ACTIVE'} = 1;
+    delete $ENV{PERL_MM_USE_DEFAULT};
+    local $ENV{'HOME'} = $testapp->workpath();
+}
 my $config_dir = path($testapp->workpath())->child('.config');
 $config_dir->mkpath();
 my $config_file = $config_dir->child('ta-tool.rc');
-- 
GitLab