`process.execArgv` does not include `--watch` or `--watch-path` options or their values on Windows
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 122k
- Fork
- 37.3k
- Merge medio
- 4g 2h
- PR unite (30g)
- 283
Descrizione
Version
v24.11.0
Platform
Microsoft Windows NT 10.0.19045.0 x64
Subsystem
process
What steps will reproduce the bug?
- Create a
build.jsfile:
/** @file build.js */
import { execArgv } from "node:process";
console.warn(execArgv);
-
Create an empty file named template.html (content does not matter).
-
Run the following command:
(node --watch-path=template.html build.js & node --watch-path template.html build.js & node --watch build.js) > /dev/null
How often does it reproduce? Is there a required condition?
Always reproducible when --watch or --watch-path options are specified on the node command line.
What is the expected behavior? Why is that the expected behavior?
Expected output:
[ '--watch-path=template.html' ]
[ '--watch-path', 'template.html' ]
[ '--watch' ]
According to Node.js documentation, process.execArgv should contain the Node options passed before the script name.
What do you see instead?
[]
[]
[]
Additional information
Bash is installed on my Windows system. I used it in the reproduction steps because it makes it easier to chain blocking commands and run them in the background compared to PowerShell or Command Prompt.
Press Ctrl+C to terminate all background processes at once.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia eseguendo il comando di riproduzione Windows e ispezionando il modo in cui process.execArgv gestisce le opzioni --watch e --watch-path prima del nome dello script. La correzione è completa quando entrambe le forme delle opzioni e i relativi valori compaiono in process.execArgv come mostrato nell’output previsto, preservando al contempo il comportamento dei tre comandi forniti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, node.js
- Ambito
- operating-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100