Skip to content

Commit

Permalink
Fix Hot Reload of Development API for Windows OS
Browse files Browse the repository at this point in the history
if the stdio is not set for child_process.fork, the windows fails without any error
it has to be 'ignore' or the option silent: true has to be set.
see nodejs/node#5146
see https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options
see https://nodejs.org/api/child_process.html#optionsdetached
  • Loading branch information
misak113 committed Mar 31, 2023
1 parent 0d5c035 commit 7f17004
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Fixed
- Development API - Reload devices when no one has connected yet
- Development API - Hot Reload works correctly even on Windows systems

## [1.19.0] - 2023-03-29
### Added
Expand Down
1 change: 1 addition & 0 deletions src/Development/Applet/Serve/AppletServeManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ export class AppletServeManagement {
const serverPath = path.join(__dirname, 'AppletServerProcess');
const serverProcess = child_process.fork(serverPath, [appletUid, appletVersion, port.toString(), publicUrl], {
detached: true,
stdio: 'ignore',
execArgv: process.env.SOS_DEVELOPMENT_APPLET_SERVE_EXEC_ARGV?.split(' '),
});
const message = await new Promise((resolve, reject) => {
Expand Down

0 comments on commit 7f17004

Please sign in to comment.