@jamesives/github-pages-deploy-action
Advanced tools
Comparing version 3.5.4 to 3.5.5
@@ -149,25 +149,2 @@ // Initial env variable setup for tests. | ||
it('should fail if the folder does not exist in the tree', async () => { | ||
Object.assign(action, { | ||
repositoryPath: 'JamesIves/github-pages-deploy-action', | ||
gitHubToken: '123', | ||
branch: 'branch', | ||
pusher: { | ||
name: 'asd', | ||
email: 'as@cat' | ||
}, | ||
folder: 'notARealFolder', | ||
ssh: true | ||
}) | ||
try { | ||
await init(action) | ||
} catch (e) { | ||
expect(execute).toBeCalledTimes(0) | ||
expect(e.message).toMatch( | ||
`There was an error initializing the repository: The notARealFolder directory you're trying to deploy doesn't exist. ❗ ❌` | ||
) | ||
} | ||
}) | ||
it('should fail if there is no provided repository path', async () => { | ||
@@ -174,0 +151,0 @@ Object.assign(action, { |
@@ -5,3 +5,2 @@ "use strict"; | ||
const core_1 = require("@actions/core"); | ||
const fs_1 = require("fs"); | ||
/* Utility function that checks to see if a value is undefined or not. */ | ||
@@ -39,5 +38,2 @@ exports.isNullOrUndefined = (value) => typeof value === 'undefined' || value === null || value === ''; | ||
} | ||
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. ❗`); | ||
} | ||
}; | ||
@@ -44,0 +40,0 @@ /* Suppresses sensitive information from being exposed in error messages. */ |
@@ -5,3 +5,3 @@ { | ||
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)", | ||
"version": "3.5.4", | ||
"version": "3.5.5", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "main": "lib/lib.js", |
import {isDebug} from '@actions/core' | ||
import {existsSync} from 'fs' | ||
import {ActionInterface} from './constants' | ||
@@ -54,8 +53,2 @@ | ||
} | ||
if (!existsSync(action.folder) && action.folder !== action.root) { | ||
throw new Error( | ||
`The ${action.folder} directory you're trying to deploy doesn't exist. ❗` | ||
) | ||
} | ||
} | ||
@@ -62,0 +55,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
11
1688073
1755