Skip to content

Commit fd3220d

Browse files
committed
checksetup: Don't let cpanm use default cpanfile
In the "cpanm --installdeps [...] ." invocation, cpanm will prefer loading cpanfile over MYMETA.json, which will cause it to miss dependencies for features that were enabled on checksetup's command line. Avoid this by temporarily moving the default cpanfile out of the way before the cpanm invocation.
1 parent 84b250f commit fd3220d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

checksetup.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ BEGIN
100100
}
101101
}
102102
print "cpanm @cpanm_args \".\"\n" if !$silent;
103+
# Ensure cpanm uses MYMETA.json and not cpanfile, in order to correctly resolve features' dependencies
104+
rename('cpanfile', 'cpanfile.checksetup');
103105
my $rv = system('cpanm', @cpanm_args, '.');
106+
rename('cpanfile.checksetup', 'cpanfile');
104107
exit 1 if $rv != 0;
105108
}
106109

0 commit comments

Comments
 (0)