diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-03-12 17:35:41 +0000 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-03-12 17:36:15 +0000 |
commit | a26e90f223b30ade5a987100c0e1d66ce2b25070 (patch) | |
tree | 3636996e4344bd9d57e66a9607d9cb9299cf1eec /perl-external | |
parent | e87bd6e6dca6f8fcf8c68ccd7cc2627a9d173382 (diff) |
don't try to index if dpan not available
Diffstat (limited to 'perl-external')
-rwxr-xr-x | perl-external/bin/module-manage.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-external/bin/module-manage.pl b/perl-external/bin/module-manage.pl index 060fb6742..707e6db8b 100755 --- a/perl-external/bin/module-manage.pl +++ b/perl-external/bin/module-manage.pl @@ -38,7 +38,6 @@ exit; sub init { add('App::cpanminus'); add('MyCPAN::App::DPAN'); - index_minicpan(); } sub setup { @@ -73,8 +72,13 @@ sub add { sub index_minicpan { # go to the minicpan dir and run dpan there - chdir $minicpan; - system "dpan -f ../dpan_config"; + if ( `which dpan` =~ m/\S/ ) { + chdir $minicpan; + system "dpan -f ../dpan_config"; + } + else { + warn "Skipping indexing - could not find dpan"; + } } sub build_all { |