@@ -2833,14 +2833,14 @@ exports.create = create;
2833
2833
* @param patterns Patterns separated by newlines
2834
2834
* @param options Glob options
2835
2835
*/
2836
- function hashFiles(patterns, options) {
2836
+ function hashFiles(patterns, options, verbose = false ) {
2837
2837
return __awaiter(this, void 0, void 0, function* () {
2838
2838
let followSymbolicLinks = true;
2839
2839
if (options && typeof options.followSymbolicLinks === 'boolean') {
2840
2840
followSymbolicLinks = options.followSymbolicLinks;
2841
2841
}
2842
2842
const globber = yield create(patterns, { followSymbolicLinks });
2843
- return internal_hash_files_1.hashFiles(globber);
2843
+ return internal_hash_files_1.hashFiles(globber, verbose );
2844
2844
});
2845
2845
}
2846
2846
exports.hashFiles = hashFiles;
@@ -7571,24 +7571,25 @@ const fs = __importStar(__webpack_require__(747));
7571
7571
const stream = __importStar(__webpack_require__(413));
7572
7572
const util = __importStar(__webpack_require__(669));
7573
7573
const path = __importStar(__webpack_require__(622));
7574
- function hashFiles(globber) {
7574
+ function hashFiles(globber, verbose = false ) {
7575
7575
var e_1, _a;
7576
7576
var _b;
7577
7577
return __awaiter(this, void 0, void 0, function* () {
7578
+ const writeDelegate = verbose ? core.info : core.debug;
7578
7579
let hasMatch = false;
7579
7580
const githubWorkspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
7580
7581
const result = crypto.createHash('sha256');
7581
7582
let count = 0;
7582
7583
try {
7583
7584
for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
7584
7585
const file = _d.value;
7585
- core.debug (file);
7586
+ writeDelegate (file);
7586
7587
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
7587
- core.debug (`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
7588
+ writeDelegate (`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
7588
7589
continue;
7589
7590
8000
}
7590
7591
if (fs.statSync(file).isDirectory()) {
7591
- core.debug (`Skip directory '${file}'.`);
7592
+ writeDelegate (`Skip directory '${file}'.`);
7592
7593
continue;
7593
7594
}
7594
7595
const hash = crypto.createHash('sha256');
@@ -7610,11 +7611,11 @@ function hashFiles(globber) {
7610
7611
}
7611
7612
result.end();
7612
7613
if (hasMatch) {
7613
- core.debug (`Found ${count} files to hash.`);
7614
+ writeDelegate (`Found ${count} files to hash.`);
7614
7615
return result.digest('hex');
7615
7616
}
7616
7617
else {
7617
- core.debug (`No matches found for glob`);
7618
+ writeDelegate (`No matches found for glob`);
7618
7619
return '';
7619
7620
}
7620
7621
});
0 commit comments