mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:51:42 +03:00
mdlinkcheck: add --dry-run to only show all found URLs
- remove the debug tracing leftovers from d9d2e339ce that made exit
unconditonally
Closes #19914
This commit is contained in:
parent
2180d7b4bc
commit
26d766596e
1 changed files with 11 additions and 3 deletions
|
|
@ -84,6 +84,12 @@ my %whitelist = (
|
|||
my %url;
|
||||
my %flink;
|
||||
|
||||
my $dry;
|
||||
if(defined $ARGV[0] && $ARGV[0] eq "--dry-run") {
|
||||
$dry = 1;
|
||||
shift @ARGV;
|
||||
}
|
||||
|
||||
# list all files to scan for links
|
||||
my @files=`git ls-files docs include lib scripts src`;
|
||||
|
||||
|
|
@ -207,10 +213,12 @@ for my $u (sort keys %whitelist) {
|
|||
}
|
||||
}
|
||||
|
||||
for my $u (sort keys %url) {
|
||||
print "$u\n";
|
||||
if($dry) {
|
||||
for my $u (sort keys %url) {
|
||||
print "$u\n";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
exit;
|
||||
|
||||
my $error;
|
||||
my @errlist;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue