From a9a49a78fa7834eaeb459e3d346ceb564df268d0 Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 30 Nov 2021 02:52:15 +0100 Subject: [PATCH] with-post-step: fix linter issues --- with-post-step/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/with-post-step/main.js b/with-post-step/main.js index 055cb56..180e396 100644 --- a/with-post-step/main.js +++ b/with-post-step/main.js @@ -21,12 +21,12 @@ // * https://github.com/docker/login-action/issues/72 // * https://github.com/actions/runner/issues/1478 -const { exec } = require('child_process'); +const { exec } = require("child_process"); function run(cmd) { exec(cmd, (error, stdout, stderr) => { - if ( stdout.length != 0 ) { console.log(`${stdout}`); } - if ( stderr.length != 0 ) { console.error(`${stderr}`); } + if ( stdout.length !== 0 ) { console.log(`${stdout}`); } + if ( stderr.length !== 0 ) { console.error(`${stderr}`); } if (error) { process.exitCode = error.code; console.error(`${error}`); @@ -36,7 +36,7 @@ function run(cmd) { const key = process.env.INPUT_KEY.toUpperCase(); -if ( process.env[`STATE_${key}`] != undefined ) { // Are we in the 'post' step? +if ( process.env[`STATE_${key}`] !== undefined ) { // Are we in the 'post' step? run(process.env.INPUT_POST); } else { // Otherwise, this is the main step console.log(`::save-state name=${key}::true`);