Skip to content

Commit 74d8377

Browse files
committed
unwrap cast to unify curlDown with curlExec
1 parent a29992b commit 74d8377

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

src/SPC/store/Downloader.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -573,14 +573,7 @@ public static function curlDown(string $url, string $path, string $method = 'GET
573573
$check = !defined('DEBUG_MODE') ? 's' : '#';
574574
$retry = $retries > 0 ? "--retry {$retries}" : '';
575575
$cmd = SPC_CURL_EXEC . " -{$check}fSL {$retry} -o \"{$path}\" {$methodArg} {$headerArg} \"{$url}\"";
576-
try {
577-
f_passthru($cmd);
578-
} catch (RuntimeException $e) {
579-
if ($e->getCode() === 2 || $e->getCode() === -1073741510) {
580-
throw new WrongUsageException('Keyboard interrupted, download failed !');
581-
}
582-
throw $e;
583-
}
576+
f_passthru($cmd);
584577
}
585578

586579
public static function getPreBuiltLockName(string $source): string

0 commit comments

Comments
 (0)