From ff9bc221111469013581c1a4ca341c6f39498087 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Fri, 15 Nov 2024 09:55:40 -0500 Subject: [PATCH] Github actions run as root --- t/carp.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/carp.t b/t/carp.t index 0c0fc0e..1e8521d 100644 --- a/t/carp.t +++ b/t/carp.t @@ -62,7 +62,13 @@ Bar -------xyz-- EOF local $ENV{'CONTENT_LENGTH'} = length($input); - does_carp_that_matches(sub { new_ok('CGI::Info')->params(upload_dir => '/') }, qr/ isn't writeable$/); + if(-w '/') { + diag('/ is writeable'); + ok(1); + ok(1); + } else { + does_carp_that_matches(sub { new_ok('CGI::Info')->params(upload_dir => '/') }, qr/ isn't writeable$/); + } does_carp_that_matches(sub { new_ok('CGI::Info')->params(upload_dir => 't/carp.t') }, qr/ isn't a full pathname$/); does_carp_that_matches(sub { new_ok('CGI::Info')->params(upload_dir => '/t/carp.t') }, qr/ isn't a directory$/); # new_ok('CGI::Info')->params(upload_dir => '/t/carp.t');