mirror of https://github.com/actions/toolkit
expand user in currentWorkspace & show more in debug
parent
20f826bfe7
commit
9b2b054532
|
@ -13,15 +13,15 @@ export async function hashFiles(
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const writeDelegate = verbose ? core.info : core.debug
|
const writeDelegate = verbose ? core.info : core.debug
|
||||||
let hasMatch = false
|
let hasMatch = false
|
||||||
const githubWorkspace = currentWorkspace
|
const githubWorkspace = path.resolve(currentWorkspace
|
||||||
? currentWorkspace
|
? currentWorkspace
|
||||||
: process.env['GITHUB_WORKSPACE'] ?? process.cwd()
|
: process.env['GITHUB_WORKSPACE'] ?? process.cwd())
|
||||||
const result = crypto.createHash('sha256')
|
const result = crypto.createHash('sha256')
|
||||||
let count = 0
|
let count = 0
|
||||||
for await (const file of globber.globGenerator()) {
|
for await (const file of globber.globGenerator()) {
|
||||||
writeDelegate(file)
|
writeDelegate(file)
|
||||||
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
|
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
|
continue
|
||||||
}
|
}
|
||||||
if (fs.statSync(file).isDirectory()) {
|
if (fs.statSync(file).isDirectory()) {
|
||||||
|
|
Loading…
Reference in New Issue