1
0
Fork 0

expand user in currentWorkspace & show more in debug

pull/1582/head
Ian Butterworth 2023-11-17 09:04:16 -05:00
parent 20f826bfe7
commit 9b2b054532
1 changed files with 3 additions and 3 deletions

View File

@ -13,15 +13,15 @@ export async function hashFiles(
): Promise<string> {
const writeDelegate = verbose ? core.info : core.debug
let hasMatch = false
const githubWorkspace = currentWorkspace
const githubWorkspace = path.resolve(currentWorkspace
? currentWorkspace
: process.env['GITHUB_WORKSPACE'] ?? process.cwd()
: process.env['GITHUB_WORKSPACE'] ?? process.cwd())
const result = crypto.createHash('sha256')
let count = 0
for await (const file of globber.globGenerator()) {
writeDelegate(file)
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`)
writeDelegate(`Ignore '${file}' since it is not under github workspace '${githubWorkspace}${path.sep}'.`)
continue
}
if (fs.statSync(file).isDirectory()) {