From e0776265c5d52ed510028597836ff36cbedb5c5f Mon Sep 17 00:00:00 2001 From: Dario Dorando Date: Wed, 6 Sep 2023 15:18:40 +0300 Subject: [PATCH] use realpathSync for fileExistsSync check --- src/git-command-manager.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index c3024b8..4f2b792 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -2,6 +2,7 @@ import * as exec from '@actions/exec' import * as io from '@actions/io' import * as utils from './utils' import * as path from 'path' +import { realpathSync } from 'fs' const tagsRefSpec = '+refs/tags/*:refs/tags/*' @@ -114,7 +115,9 @@ export class GitCommandManager { args.push('--progress', '--no-recurse-submodules') if ( - utils.fileExistsSync(path.join(this.workingDirectory, '.git', 'shallow')) + utils.fileExistsSync( + realpathSync(path.join(this.workingDirectory, '.git', 'shallow')) + ) ) { args.push('--unshallow') }