Skip to content

Commit 1cc2e63

Browse files
author
Greg Beaver
committed
Tomas say:
"I think you'd have to let the user still install the package with --force." I say, OK :)
1 parent c952ea0 commit 1cc2e63

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pear/PEAR/Installer.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,12 @@ function _installFile($file, $atts, $tmp_path)
284284
if (strtolower($md5sum) == strtolower($atts['md5sum'])) {
285285
$this->log(3, "md5sum ok: $final_dest_file");
286286
} else {
287-
return $this->raiseError("bad md5sum for file $final_dest_file",
288-
PEAR_INSTALLER_FAILED);
287+
if (empty($options['force'])) {
288+
return $this->raiseError("bad md5sum for file $final_dest_file",
289+
PEAR_INSTALLER_FAILED);
290+
} else {
291+
$this->log(0, "warning : bad md5sum for file $final_dest_file");
292+
}
289293
}
290294
}
291295
if (!OS_WINDOWS) {

0 commit comments

Comments
 (0)