`eoc dataize` crashes with unhandled exception if Java process spawn fails

Open Beginner friendly
#1,339 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
cli

Research direction

Start in src/commands/java/dataize.js and inspect how runner('java', params, {stdio: 'inherit'}) handles the child process lifecycle. Reproduce the failure with javac available but java absent from PATH, then verify that process-spawn errors use the same concise controlled failure path as other Maven/JDK failures.

Written by the indexing model from the issue text.

Description

bug good-title

What happens

When the java child cannot be spawned, the Java dataize command crashes through an unhandled error event instead of returning a controlled command failure. src/commands/java/dataize.js listens only for close and never handles error.

How to reproduce

  1. Keep javac available so verifyJavac() succeeds, but make the java executable unavailable to the child process (for example, invoke the command with a PATH containing only javac).
  2. Run eoc dataize ... on the Java backend.
  3. spawn('java', ...) emits error (ENOENT), but there is no listener; Node reports an uncaught exception and the command terminates with a raw stack trace.

Expected result

The command should reject or exit with a concise diagnostic naming the unavailable Java runtime, and it should use the same controlled error path as other Maven/JDK failures.

Evidence

src/commands/java/dataize.js calls runner('java', params, {stdio: 'inherit'}).on('close', ...); it does not attach an error listener. Node's ChildProcess emits error when process creation fails, before close is guaranteed.

Dominant language
JavaScript
Stars
36
Forks
64
Avg merge
1d 14h
Merged PRs (30d)
17

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from objectionary/eoc

All issues in objectionary/eoc

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.