Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(command-dev): ensure no orphaned child process on Windows #3278

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/commands/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ const startFrameworkServer = async function ({ settings, exit }) {
log(`${NETLIFYDEVLOG} Starting Netlify Dev with ${settings.framework || 'custom config'}`)

// we use reject=false to avoid rejecting synchronously when the command doesn't exist
const frameworkProcess = execa.command(settings.command, { preferLocal: true, reject: false, env: settings.env })
const frameworkProcess = execa.command(settings.command, {
preferLocal: true,
reject: false,
env: settings.env,
// windowsHide needs to be false for child process to terminate properly on Windows
windowsHide: false,
})
frameworkProcess.stdout.pipe(stripAnsiCc.stream()).pipe(process.stdout)
frameworkProcess.stderr.pipe(stripAnsiCc.stream()).pipe(process.stderr)
process.stdin.pipe(frameworkProcess.stdin)
Expand Down