From 9b2b054532043ea2b0c992fe0a122cf58affc5c1 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Fri, 17 Nov 2023 09:04:16 -0500 Subject: [PATCH] expand user in currentWorkspace & show more in debug --- packages/glob/src/internal-hash-files.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/glob/src/internal-hash-files.ts b/packages/glob/src/internal-hash-files.ts index d968db5e..4076f7ee 100644 --- a/packages/glob/src/internal-hash-files.ts +++ b/packages/glob/src/internal-hash-files.ts @@ -13,15 +13,15 @@ export async function hashFiles( ): Promise { 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()) {