@@ -2915,14 +2915,14 @@ exports.create = create;
2915
2915
* @param patterns Patterns separated by newlines
2916
2916
* @param options Glob options
2917
2917
*/
2918
- function hashFiles(patterns, options, verbose = false ) {
2918
+ function hashFiles(patterns, options) {
2919
2919
return __awaiter(this, void 0, void 0, function* () {
2920
2920
let followSymbolicLinks = true;
2921
2921
if (options && typeof options.followSymbolicLinks === 'boolean') {
2922
2922
followSymbolicLinks = options.followSymbolicLinks;
2923
2923
}
2924
2924
const globber = yield create(patterns, { followSymbolicLinks });
2925
- return internal_hash_files_1.hashFiles(globber, verbose );
2925
+ return internal_hash_files_1.hashFiles(globber);
2926
2926
});
2927
2927
}
2928
2928
exports.hashFiles = hashFiles;
@@ -9095,25 +9095,24 @@ const fs = __importStar(__webpack_require__(747));
9095
9095
const stream = __importStar(__webpack_require__(413));
9096
9096
const util = __importStar(__webpack_require__(669));
9097
9097
const path = __importStar(__webpack_require__(622));
9098
- function hashFiles(globber, verbose = false ) {
9098
+ function hashFiles(globber) {
9099
9099
var e_1, _a;
9100
9100
var _b;
9101
9101
return __awaiter(this, void 0, void 0, function* () {
9102
- const writeDelegate = verbose ? core.info : core.debug;
9103
9102
let hasMatch = false;
9104
9103
const githubWorkspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
9105
9104
const result = crypto.createHash('sha256');
9106
9105
let count = 0;
9107
9106
try {
9108
9107
for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
9109
9108
const file = _d.value;
9110
- writeDelegate (file);
9109
+ core.debug (file);
9111
9110
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
9112
- writeDelegate (`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
9111
+ core.debug (`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
9113
9112
continue;
9114
9113
}
9115
9114
if (fs.statSync(file).isDirectory()) {
9116
- writeDelegate (`Skip directory '${file}'.`);
9115
+ core.debug (`Skip directory '${file}'.`);
9117
9116
continue;
9118
9117
}
9119
9118
const hash = crypto.createHash('sha256');
@@ -9135,11 +9134,11 @@ function hashFiles(globber, verbose = false) {
9135
9134
}
9136
9135
result.end();
9137
9136
if (hasMatch) {
9138
- writeDelegate (`Found ${count} files to hash.`);
9137
+ core.debug (`Found ${count} files to hash.`);
9139
9138
return result.digest('hex');
9140
9139
}
9141
9140
else {
9142
- writeDelegate (`No matches found for glob`);
9141
+ core.debug (`No matches found for glob`);
9143
9142
return '';
9144
9143
}
9145
9144
});
0 commit comments