forge icon indicating copy to clipboard operation
forge copied to clipboard

Exiting `start` process duplicates terminal output

Open erickzhao opened this issue 8 months ago • 2 comments

Pre-flight checklist

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project uses.
  • [x] I have searched the issue tracker for a bug that matches the one I want to file, without success.

Forge version

v7.8.0

Electron version

36.0.0

Operating system

macOS Sequoia

Last known working Forge version

v6.0.0-beta.70

Expected behavior

When interrupting the start command, there should be no duplicate output.

Actual behavior

After pressing Ctrl + C, the terminal output

yarn start
yarn run v1.22.22
$ electron-forge start
✔ Checking your system
✔ Locating application
✔ Loading configuration
✔ Preparing native dependencies [0.1s]
✔ Generating assets

^C✔ Checking your system
✔ Locating application
✔ Loading configuration
✔ Preparing native dependencies [0.1s]
✔ Generating assets

Steps to reproduce

With any template, just npm start and press Ctrl + C to terminate the Forge process.

Additional information

This seems to be caused by our migration from async-ora to listr2 (https://github.com/electron/forge/pull/3022).

However, I'm unable to repro with Listr2's base examples, so I think the problem is with our implementation.

erickzhao avatar May 09 '25 18:05 erickzhao

This might be related to the registerSignalListeners setting in Listr2 (ref https://github.com/listr2/listr2/issues/709). The fix for that landed in the next major version.

erickzhao avatar May 09 '25 18:05 erickzhao