From c6c36e7358170ea857346292160d1625b9779603 Mon Sep 17 00:00:00 2001 From: James Ives Date: Sat, 6 Jun 2020 13:18:49 -0400 Subject: [PATCH] Test2 --- lib/util.js | 9 +++++---- src/util.ts | 12 ++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/util.js b/lib/util.js index ca816bbb..6a7d36c4 100644 --- a/lib/util.js +++ b/lib/util.js @@ -2,7 +2,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.suppressSensitiveInformation = exports.hasRequiredParameters = exports.generateRepositoryPath = exports.generateTokenType = exports.isNullOrUndefined = void 0; const core_1 = require("@actions/core"); -const fs_1 = require("fs"); /* Utility function that checks to see if a value is undefined or not. */ exports.isNullOrUndefined = (value) => typeof value === 'undefined' || value === null || value === ''; /* Generates a token type used for the action. */ @@ -35,9 +34,11 @@ exports.hasRequiredParameters = (action) => { if (action.folder.startsWith('/') || action.folder.startsWith('./')) { throw new Error("Incorrectly formatted build folder. The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly."); } - if (!fs_1.existsSync(action.folder) && action.folder !== action.root) { - throw new Error(`The ${action.folder} directory you're trying to deploy doesn't exist. ❗`); - } + // if (!existsSync(action.folder) && action.folder !== action.root) { + // throw new Error( + // `The ${action.folder} directory you're trying to deploy doesn't exist. ❗` + // ) + // } }; /* Suppresses sensitive information from being exposed in error messages. */ exports.suppressSensitiveInformation = (str, action) => { diff --git a/src/util.ts b/src/util.ts index e0ab5c49..71f01931 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,5 +1,5 @@ import {isDebug} from '@actions/core' -import {existsSync} from 'fs' +// import {existsSync} from 'fs' import {ActionInterface} from './constants' /* Utility function that checks to see if a value is undefined or not. */ @@ -52,11 +52,11 @@ export const hasRequiredParameters = (action: ActionInterface): void => { ) } - if (!existsSync(action.folder) && action.folder !== action.root) { - throw new Error( - `The ${action.folder} directory you're trying to deploy doesn't exist. ❗` - ) - } + // if (!existsSync(action.folder) && action.folder !== action.root) { + // throw new Error( + // `The ${action.folder} directory you're trying to deploy doesn't exist. ❗` + // ) + // } } /* Suppresses sensitive information from being exposed in error messages. */