From 08e375621a07f38363781b8bb81278501e5a80f8 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Wed, 6 Jan 2021 00:29:55 +0900 Subject: [PATCH] change safeLoad to load --- __tests__/get-inputs.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/get-inputs.test.ts b/__tests__/get-inputs.test.ts index 7ff2590d2..2cd306a9d 100644 --- a/__tests__/get-inputs.test.ts +++ b/__tests__/get-inputs.test.ts @@ -10,7 +10,7 @@ beforeEach(() => { process.stdout.write = jest.fn(); // eslint-disable-next-line @typescript-eslint/no-explicit-any - const doc: any = yaml.safeLoad(fs.readFileSync(__dirname + '/../action.yml', 'utf8')); + const doc: any = yaml.load(fs.readFileSync(__dirname + '/../action.yml', 'utf8')); Object.keys(doc.inputs).forEach(name => { const envVar = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`; process.env[envVar] = doc.inputs[name]['default']; @@ -19,7 +19,7 @@ beforeEach(() => { afterEach(() => { // eslint-disable-next-line @typescript-eslint/no-explicit-any - const doc: any = yaml.safeLoad(fs.readFileSync(__dirname + '/../action.yml', 'utf8')); + const doc: any = yaml.load(fs.readFileSync(__dirname + '/../action.yml', 'utf8')); Object.keys(doc.inputs).forEach(name => { const envVar = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`; console.debug(`delete ${envVar}\t${process.env[envVar]}`);