diff --git a/actions/setup/js/check_workflow_timestamp_api.cjs b/actions/setup/js/check_workflow_timestamp_api.cjs index 09b40e2723c..fd0cc1d118c 100644 --- a/actions/setup/js/check_workflow_timestamp_api.cjs +++ b/actions/setup/js/check_workflow_timestamp_api.cjs @@ -314,10 +314,7 @@ async function main() { if (localMdFilePath.startsWith(allowedDir + path.sep)) { core.info(" Using local filesystem file reader for debug pass"); // defaultFileReader is the built-in fs-based reader; wrap it as async - fileReader = async filePath => { - const fs = require("fs"); - return fs.readFileSync(filePath, "utf8"); - }; + fileReader = async filePath => fs.readFileSync(filePath, "utf8"); // Override workflowMdPath to the resolved local path for this pass await computeFrontmatterHash(localMdFilePath, { fileReader, verbose: true }); core.info("═══ End of debug hash recomputation ═══");