Changing paths and variable typo

This commit is contained in:
Tim Heuer
2019-12-14 13:35:30 -08:00
parent 22c8c92cdf
commit c141b6062f
2 changed files with 4 additions and 24 deletions

View File

@@ -1,9 +1,8 @@
const core = require('@actions/core');
const wait = require('./wait');
const fs = require('fs');
// get input parameter values from config
var fileName = env['TEMP'] + '\\'+ core.getInput('fileName');
var fileName = core.getInput('fileName');
var encodedString = core.getInput('encodedString');
// most @actions toolkit packages have async methods
@@ -11,7 +10,7 @@ async function run() {
try {
const tempFile = Buffer.from(encodedString, 'base64');
if (certificate.length == 0)
if (tempFile.length == 0)
core.setFailed('Certificate value is not set');
await fs.writeFile(fileName, tempFile);