Skip to content

Commit 67f5a94

Browse files
shlomifautarch
authored andcommitted
Fix bug where the user-provided tidyall class was not loaded
This fixes issue #43.
1 parent 8ddcb75 commit 67f5a94

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
2.24.x. See notes in 0.75 for why we stopped passing `--quiet` in the first
55
place.
66

7+
- Fixed a bug where the class in the `--tidyall-class` option was not
8+
loaded. Fixed by Shlomi Fish. PR #107. Fixed GH #43.
9+
710

811
0.78 2020-04-25
912

bin/tidyall

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use Capture::Tiny qw(capture_merged);
33
use Code::TidyAll;
44
use Config;
55
use Path::Tiny qw(cwd path);
6+
use Module::Runtime qw( use_module );
67
use Getopt::Long;
78
use strict;
89
use warnings;
@@ -118,6 +119,8 @@ $params{iterations} = $iterations if $iterations;
118119

119120
my $tidyall_class = $params{tidyall_class} || 'Code::TidyAll';
120121

122+
use_module($tidyall_class);
123+
121124
my ( $ct, @paths );
122125

123126
if ($pipe) {

0 commit comments

Comments
 (0)