Skip to content

[eslint-monster] [Code Quality] actions/setup/js: wrap synchronous fs and mkdirSync calls in try/catch #46094

Description

@github-actions

Summary

npm run lint:setup-js is currently reporting a large concentration of gh-aw-custom/require-fs-sync-try-catch and gh-aw-custom/require-mkdirsync-try-catch warnings across actions/setup/js. This remediation stream should focus only on the JS action code under actions/setup/js and eliminate these unhandled synchronous filesystem operations.

Affected files

Representative files from the current lint run:

  • actions/setup/js/apply_safe_outputs_replay.cjs
  • actions/setup/js/build_checkout_manifest.cjs
  • actions/setup/js/convert_gateway_config_shared.cjs
  • actions/setup/js/evaluate_outcomes.cjs
  • actions/setup/js/extract_inline_skills.cjs
  • actions/setup/js/generate_safe_outputs_tools.cjs
  • actions/setup/js/run_evals.cjs
  • actions/setup/js/runtime_import.cjs
  • actions/setup/js/setup_comment_memory_files.cjs
  • actions/setup/js/start_mcp_gateway.cjs

Additional affected files can be taken directly from /tmp/gh-aw/agent/eslint-factory.log.

Representative diagnostics

  • apply_safe_outputs_replay.cjs:73:3 — wrap fs.mkdirSync(destDir) in try/catch
  • apply_safe_outputs_replay.cjs:102:19 — wrap fs.readFileSync(agentOutputFile) in try/catch
  • build_checkout_manifest.cjs:100:3 — wrap fs.mkdirSync(manifestDir) in try/catch
  • build_checkout_manifest.cjs:130:3 — wrap fs.writeFileSync(manifestPath) in try/catch
  • evaluate_outcomes.cjs:2038:3 — wrap fs.mkdirSync(CACHE_DIR) in try/catch
  • run_evals.cjs:127:22 — wrap fs.readFileSync(EVALS_LOG_PATH) in try/catch
  • start_mcp_gateway.cjs:940:5 — wrap fs.appendFileSync(githubOutput) in try/catch

Expected outcome

  • All synchronous filesystem reads/writes/appends/mkdir calls in the selected actions/setup/js files are guarded with appropriate try/catch handling
  • Error handling remains behaviorally consistent for GitHub Actions usage
  • The affected files no longer trigger require-fs-sync-try-catch or require-mkdirsync-try-catch

Checklist

  • Audit the listed files for sync fs and mkdir usage flagged by ESLint
  • Add focused try/catch handling without broad behavioral regressions
  • Keep changes scoped to actions/setup/js
  • Run targeted tests if available
  • Run npm run lint:setup-js

Source

Daily ESLint Monster remediation stream from workflow run 29538839244.

Generated by 🧹 ESLint Monster · 15.6 AIC · ⌖ 8.47 AIC · ⊞ 3.9K ·

  • expires on Jul 23, 2026, 2:22 PM UTC-08:00

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions