Add no_tools_cache flag

This commit is contained in:
Shivam Mathur
2021-07-23 13:59:16 +05:30
parent 0b38e86c65
commit 7bd9f10bef
3 changed files with 23 additions and 15 deletions

View File

@ -212,7 +212,8 @@ export async function addComposer(data: RS): Promise<string> {
default:
source_url = `${getcomposer}/composer-stable.phar`;
}
data['url'] = `${cache_url},${source_url}`;
const use_cache: boolean = (await utils.readEnv('NO_TOOLS_CACHE')) !== 'true';
data['url'] = use_cache ? `${cache_url},${source_url}` : source_url;
data['version_parameter'] = data['version'];
return await addArchive(data);
}