Pass in the directory for hashFiles (#1318)

This commit is contained in:
John Sudol
2023-01-24 14:12:47 -05:00
committed by GitHub
parent 5804607845
commit d3801d332c
3 changed files with 15 additions and 4 deletions

View File

@@ -8,11 +8,14 @@ import {Globber} from './glob'
export async function hashFiles(
globber: Globber,
currentWorkspace: string,
verbose: Boolean = false
): Promise<string> {
const writeDelegate = verbose ? core.info : core.debug
let hasMatch = false
const githubWorkspace = process.env['GITHUB_WORKSPACE'] ?? process.cwd()
const githubWorkspace = currentWorkspace
? currentWorkspace
: process.env['GITHUB_WORKSPACE'] ?? process.cwd()
const result = crypto.createHash('sha256')
let count = 0
for await (const file of globber.globGenerator()) {