Skip to content

Commit 5e3a037

Browse files
committed
Rollback folder check
1 parent a108ee7 commit 5e3a037

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

__tests__/git.test.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -146,29 +146,6 @@ describe('git', () => {
146146
}
147147
})
148148

149-
it('should fail if the folder does not exist in the tree', async () => {
150-
Object.assign(action, {
151-
repositoryPath: 'JamesIves/github-pages-deploy-action',
152-
gitHubToken: '123',
153-
branch: 'branch',
154-
pusher: {
155-
name: 'asd',
156-
email: 'as@cat'
157-
},
158-
folder: 'notARealFolder',
159-
ssh: true
160-
})
161-
162-
try {
163-
await init(action)
164-
} catch (e) {
165-
expect(execute).toBeCalledTimes(0)
166-
expect(e.message).toMatch(
167-
`There was an error initializing the repository: The notARealFolder directory you're trying to deploy doesn't exist. ❗ ❌`
168-
)
169-
}
170-
})
171-
172149
it('should fail if there is no provided repository path', async () => {
173150
Object.assign(action, {
174151
repositoryPath: null,

src/util.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {isDebug} from '@actions/core'
2-
import {existsSync} from 'fs'
32
import {ActionInterface} from './constants'
43

54
/* Utility function that checks to see if a value is undefined or not. */
@@ -51,12 +50,6 @@ export const hasRequiredParameters = (action: ActionInterface): void => {
5150
"Incorrectly formatted build folder. The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly."
5251
)
5352
}
54-
55-
if (!existsSync(action.folder) && action.folder !== action.root) {
56-
throw new Error(
57-
`The ${action.folder} directory you're trying to deploy doesn't exist. ❗`
58-
)
59-
}
6053
}
6154

6255
/* Suppresses sensitive information from being exposed in error messages. */

0 commit comments

Comments
 (0)