mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-09-01 02:14:16 +07:00
Fix wp-cli support
This commit is contained in:
10
dist/index.js
vendored
10
dist/index.js
vendored
@ -1872,13 +1872,9 @@ function getWpCliUrl(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
switch (version) {
|
||||
case 'latest':
|
||||
return 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar';
|
||||
return 'wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true';
|
||||
default:
|
||||
return ('https://github.com/wp-cli/wp-cli/releases/download/v' +
|
||||
version +
|
||||
'/wp-cli-' +
|
||||
version +
|
||||
'.phar');
|
||||
return yield getUri('wp-cli', '-' + version + '.phar', version, 'wp-cli/wp-cli/releases', 'v', 'download');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -2069,7 +2065,7 @@ function addTools(tools_csv, php_version, os_version) {
|
||||
script += yield addArchive('symfony', version, url, os_version);
|
||||
break;
|
||||
case 'wp-cli':
|
||||
url = yield getWpCliUrl(version);
|
||||
url = github + (yield getWpCliUrl(version));
|
||||
script += yield addArchive(tool, version, url, os_version);
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user