@@ -2833,14 +2833,14 @@ exports.create = create;
28332833 * @param patterns Patterns separated by newlines
28342834 * @param options Glob options
28352835 */
2836- function hashFiles(patterns, options) {
2836+ function hashFiles(patterns, options, verbose = false ) {
28372837 return __awaiter(this, void 0, void 0, function* () {
28382838 let followSymbolicLinks = true;
28392839 if (options && typeof options.followSymbolicLinks === 'boolean') {
28402840 followSymbolicLinks = options.followSymbolicLinks;
28412841 }
28422842 const globber = yield create(patterns, { followSymbolicLinks });
2843- return internal_hash_files_1.hashFiles(globber);
2843+ return internal_hash_files_1.hashFiles(globber, verbose );
28442844 });
28452845}
28462846exports.hashFiles = hashFiles;
@@ -7571,24 +7571,25 @@ const fs = __importStar(__webpack_require__(747));
75717571const stream = __importStar(__webpack_require__(413));
75727572const util = __importStar(__webpack_require__(669));
75737573const path = __importStar(__webpack_require__(622));
7574- function hashFiles(globber) {
7574+ function hashFiles(globber, verbose = false ) {
75757575 var e_1, _a;
75767576 var _b;
75777577 return __awaiter(this, void 0, void 0, function* () {
7578+ const writeDelegate = verbose ? core.info : core.debug;
75787579 let hasMatch = false;
75797580 const githubWorkspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
75807581 const result = crypto.createHash('sha256');
75817582 let count = 0;
75827583 try {
75837584 for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
75847585 const file = _d.value;
7585- core.debug (file);
7586+ writeDelegate (file);
75867587 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.`);
75887589 continue;
75897590 }
75907591 if (fs.statSync(file).isDirectory()) {
7591- core.debug (`Skip directory '${file}'.`);
7592+ writeDelegate (`Skip directory '${file}'.`);
75927593 continue;
75937594 }
75947595 const hash = crypto.createHash('sha256');
@@ -7610,11 +7611,11 @@ function hashFiles(globber) {
76107611 }
76117612 result.end();
76127613 if (hasMatch) {
7613- core.debug (`Found ${count} files to hash.`);
7614+ writeDelegate (`Found ${count} files to hash.`);
76147615 return result.digest('hex');
76157616 }
76167617 else {
7617- core.debug (`No matches found for glob`);
7618+ writeDelegate (`No matches found for glob`);
76187619 return '';
76197620 }
76207621 });
0 commit comments