mirror of
https://github.com/gradle/actions.git
synced 2026-04-19 18:12:58 +08:00
Mute license warning when terms are accepted (#911)
With licensing changes in v6, a license warning was added to the logs and job summary. Now, accepting the Build Scan Terms of Use or providing a Develocity Access Key will mute this warning.
This commit is contained in:
@@ -68,8 +68,14 @@ export async function getCacheService(cacheConfig: CacheConfig): Promise<CacheSe
|
||||
if (cacheConfig.isCacheDisabled()) {
|
||||
return new NoOpCacheService()
|
||||
}
|
||||
|
||||
const cacheService = await loadVendoredCacheService()
|
||||
if (cacheConfig.isCacheLicenseAccepted()) {
|
||||
return cacheService
|
||||
}
|
||||
|
||||
await logCacheLicenseWarning()
|
||||
return new LicenseWarningCacheService(await loadVendoredCacheService())
|
||||
return new LicenseWarningCacheService(cacheService)
|
||||
}
|
||||
|
||||
export async function loadVendoredCacheService(): Promise<CacheService> {
|
||||
@@ -90,5 +96,5 @@ function findVendoredLibraryPath(): string {
|
||||
}
|
||||
|
||||
export async function logCacheLicenseWarning(): Promise<void> {
|
||||
console.warn(CACHE_LICENSE_WARNING)
|
||||
console.info(CACHE_LICENSE_WARNING)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user