use realpathSync for fileExistsSync check

This commit is contained in:
Dario Dorando 2023-09-06 15:18:40 +03:00
parent 6ea29d2e6e
commit e0776265c5

View file

@ -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')
}