diff --git a/__tests__/git.test.ts b/__tests__/git.test.ts index f1c7bc5fa..ddb0b65d2 100644 --- a/__tests__/git.test.ts +++ b/__tests__/git.test.ts @@ -54,7 +54,7 @@ describe('git', () => { }) await init(action) - expect(execute).toHaveBeenCalledTimes(8) + expect(execute).toHaveBeenCalledTimes(7) }) it('should catch when a function throws an error', async () => { @@ -101,7 +101,7 @@ describe('git', () => { }) await init(action) - expect(execute).toHaveBeenCalledTimes(8) + expect(execute).toHaveBeenCalledTimes(7) }) it('should not unset git config if a user is using ssh', async () => { @@ -123,7 +123,7 @@ describe('git', () => { }) await init(action) - expect(execute).toHaveBeenCalledTimes(7) + expect(execute).toHaveBeenCalledTimes(6) process.env.CI = undefined }) @@ -144,7 +144,7 @@ describe('git', () => { }) await init(action) - expect(execute).toHaveBeenCalledTimes(8) + expect(execute).toHaveBeenCalledTimes(7) }) }) diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 3d33495aa..f0ec58053 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -53,7 +53,7 @@ describe('main', () => { debug: true }) await run(action) - expect(execute).toHaveBeenCalledTimes(19) + expect(execute).toHaveBeenCalledTimes(18) expect(rmRF).toHaveBeenCalledTimes(1) expect(exportVariable).toHaveBeenCalledTimes(1) }) @@ -73,7 +73,7 @@ describe('main', () => { isTest: TestFlag.HAS_CHANGED_FILES }) await run(action) - expect(execute).toHaveBeenCalledTimes(22) + expect(execute).toHaveBeenCalledTimes(21) expect(rmRF).toHaveBeenCalledTimes(1) expect(exportVariable).toHaveBeenCalledTimes(1) }) diff --git a/package.json b/package.json index a8e06b0ad..7e49b427d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@jamesives/github-pages-deploy-action", "description": "GitHub action for building a project and deploying it to GitHub pages.", "author": "James Ives (https://jamesiv.es)", - "version": "4.6.4", + "version": "4.6.5", "license": "MIT", "main": "lib/lib.js", "types": "lib/lib.d.ts", diff --git a/src/git.ts b/src/git.ts index f8b9a4e0f..a1e4ea922 100644 --- a/src/git.ts +++ b/src/git.ts @@ -24,22 +24,7 @@ export async function init(action: ActionInterface): Promise { info('Configuring git…') /** - * Add safe directory to the global git config. - */ - try { - await execute( - `git config --global safe.directory '*'`, - action.workspace, - action.silent - ) - } catch { - info('Unable to set workflow file tree as a safe directory…') - } - - /** - * Ensure that the workspace is a safe directory, this is somewhat redundant as the action - * will always set the workspace as a safe directory, but this is a fallback in case the action - * fails to do so. + * Ensure that the workspace is a safe directory. */ try { await execute(