From 36d2ce149ef6fea8601c6ee9636d1a3dcbf09ad6 Mon Sep 17 00:00:00 2001 From: Gordey Doronin Date: Mon, 21 Jun 2021 14:33:27 +0200 Subject: [PATCH] Switch warning to info logging --- __tests__/installer.test.ts | 12 ++++++------ dist/index.js | 2 +- src/installer.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 13a1c55c..12805972 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -549,7 +549,7 @@ describe('setup-node', () => { await main.run(); // assert - expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') + expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...'); expect(dbgSpy).toHaveBeenCalledWith(`LTS alias 'erbium' for Node version 'lts/erbium'`) expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '12.16.2' for Node version 'lts/erbium'`) @@ -577,7 +577,7 @@ describe('setup-node', () => { await main.run(); // assert - expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') + expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...'); expect(dbgSpy).toHaveBeenCalledWith(`LTS alias 'erbium' for Node version 'lts/erbium'`) expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '12.16.2' for Node version 'lts/erbium'`) @@ -604,7 +604,7 @@ describe('setup-node', () => { await main.run(); // assert - expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') + expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...'); expect(dbgSpy).toHaveBeenCalledWith(`LTS alias '*' for Node version 'lts/*'`) expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '14.0.0' for Node version 'lts/*'`) @@ -632,7 +632,7 @@ describe('setup-node', () => { await main.run(); // assert - expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') + expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...'); expect(dbgSpy).toHaveBeenCalledWith(`LTS alias '*' for Node version 'lts/*'`) expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '14.0.0' for Node version 'lts/*'`) @@ -658,7 +658,7 @@ describe('setup-node', () => { await main.run(); // assert - expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') + expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...'); expect(logSpy).toHaveBeenCalledWith('Unable to resolve version from manifest...'); expect(dbgSpy).toHaveBeenCalledWith(`Unexpected LTS alias '' for Node version 'lts/'`) @@ -680,7 +680,7 @@ describe('setup-node', () => { await main.run(); // assert - expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') + expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true') expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...'); expect(dbgSpy).toHaveBeenCalledWith(`LTS alias 'unknown' for Node version 'lts/unknown'`) expect(logSpy).toHaveBeenCalledWith('Unable to resolve version from manifest...'); diff --git a/dist/index.js b/dist/index.js index d2c35be1..915200f0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13108,7 +13108,7 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) { let osPlat = os.platform(); let osArch = translateArchToDistUrl(arch); if (isLtsVersion(versionSpec)) { - core.warning('LTS version is provided. For LTS versions `check-latest` will be automatically set to true'); + core.info('LTS version is provided. For LTS versions `check-latest` will be automatically set to true'); checkLatest = true; } if (checkLatest) { diff --git a/src/installer.ts b/src/installer.ts index 2df2e13e..284b8b5e 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -39,7 +39,7 @@ export async function getNode( let osArch: string = translateArchToDistUrl(arch); if (isLtsVersion(versionSpec)) { - core.warning('LTS version is provided. For LTS versions `check-latest` will be automatically set to true'); + core.info('LTS version is provided. For LTS versions `check-latest` will be automatically set to true'); checkLatest = true; }