mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 21:34:53 +08:00
Revert "unwrap cast to unify curlDown with curlExec"
This reverts commit 74d8377400630ad88a5736b8b595c6c98b456e8a.
This commit is contained in:
parent
74d8377400
commit
7fd858b472
@ -573,7 +573,14 @@ class Downloader
|
||||
$check = !defined('DEBUG_MODE') ? 's' : '#';
|
||||
$retry = $retries > 0 ? "--retry {$retries}" : '';
|
||||
$cmd = SPC_CURL_EXEC . " -{$check}fSL {$retry} -o \"{$path}\" {$methodArg} {$headerArg} \"{$url}\"";
|
||||
f_passthru($cmd);
|
||||
try {
|
||||
f_passthru($cmd);
|
||||
} catch (RuntimeException $e) {
|
||||
if ($e->getCode() === 2 || $e->getCode() === -1073741510) {
|
||||
throw new WrongUsageException('Keyboard interrupted, download failed !');
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getPreBuiltLockName(string $source): string
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user