Skip to content

Commit 024f821

Browse files
committed
Fix tidy also for OSX
1 parent 86f4cad commit 024f821

5 files changed

Lines changed: 12 additions & 7 deletions

File tree

builder/custom.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use parent qw(Module::Build);
66

77
sub new {
88
my ($class, %args) = @_;
9-
die "OS Unsupported: ".$^O if ($^O !~ m#(?i)(Linux|darwin)#);
9+
die "OS Unsupported: " . $^O if ($^O !~ m#(?i)(Linux|darwin)#);
1010
print $^O;
1111
return $class->SUPER::new(%args);
1212
}

t/11_containers.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ use Mojo::IOLoop::ReadWriteProcess::CGroup qw(cgroupv2 cgroupv1);
1414
use Mojo::IOLoop::ReadWriteProcess::Container qw(container);
1515

1616
eval {
17-
die "OS Unsupported: ".$^O if ($^O !~ m#(?i)(Linux)#);
17+
die "OS Unsupported: " . $^O if ($^O !~ m#(?i)(Linux)#);
1818
my $try_cgroup
1919
= cgroupv1(controller => 'pids', name => 'group')->child('test')->create;
2020
die unless $try_cgroup->exists();
2121
};
2222

23-
plan skip_all => "This test works only if you have cgroups permissions or a supported OS" if $@;
23+
plan skip_all =>
24+
"This test works only if you have cgroups permissions or a supported OS"
25+
if $@;
2426

2527
subtest belongs => sub {
2628
cgroupv1(controller => 'pids', name => 'group')->create;

t/12_mocked_container.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ use Mojo::Util 'monkey_patch';
1818
use Mojo::IOLoop::ReadWriteProcess::Namespace;
1919

2020
eval {
21-
die "OS Unsupported: ".$^O if ($^O !~ m#(?i)(Linux)#);
21+
die "OS Unsupported: " . $^O if ($^O !~ m#(?i)(Linux)#);
2222
my $try_cgroup
2323
= cgroupv1(controller => 'pids', name => 'group')->child('test')->create;
2424
die unless $try_cgroup->exists();
2525
};
2626

27-
plan skip_all => "This test works only if you have cgroups permissions or a supported OS" if $@;
27+
plan skip_all =>
28+
"This test works only if you have cgroups permissions or a supported OS"
29+
if $@;
2830

2931
sub mock_test {
3032
my $c = shift;

t/data/simple_rwp.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
use Mojo::IOLoop::ReadWriteProcess 'process';
55

66
# Not all systems have /bin/true, this is /usr/bin/true on osx for instance
7-
my $p = process(execute => 'command -v true')->start()->wait_stop->read_all_stdout;
7+
my $p
8+
= process(execute => 'command -v true')->start()->wait_stop->read_all_stdout;
89
exit process(execute => $p)->start()->wait_stop()->exit_status();

tools/tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cd "${0%/*}/.."
2020
# just to make sure we are at the right location
2121
test -e tools/tidy || exit 1
2222

23-
find -name '*.tdy' -delete
23+
find . -name '*.tdy' -delete
2424

2525
find . \( -name '*.p[lm]' -o -name '*.t' \) -print0 | xargs -0 perltidy --pro=.../.perltidyrc
2626

0 commit comments

Comments
 (0)