@@ -18,7 +18,7 @@ const {
1818 triggerUncaughtException,
1919 exitCodes : { kNoFailure } ,
2020} = internalBinding ( 'errors' ) ;
21- const { getOptionValue, getOptionsAsFlagsFromBinding } = require ( 'internal/options' ) ;
21+ const { getOptionValue } = require ( 'internal/options' ) ;
2222const { FilesWatcher } = require ( 'internal/watch_mode/files_watcher' ) ;
2323const { green, blue, red, white, clear } = require ( 'internal/util/colors' ) ;
2424const { convertToValidSignal } = require ( 'internal/util' ) ;
@@ -44,14 +44,13 @@ const kCommand = ArrayPrototypeSlice(process.argv, 1);
4444const kCommandStr = inspect ( ArrayPrototypeJoin ( kCommand , ' ' ) ) ;
4545
4646const argsWithoutWatchOptions = [ ] ;
47- const argsFromBinding = getOptionsAsFlagsFromBinding ( ) ;
48- for ( let i = 0 ; i < argsFromBinding . length ; i ++ ) {
49- const arg = argsFromBinding [ i ] ;
47+ for ( let i = 0 ; i < process . execArgv . length ; i ++ ) {
48+ const arg = process . execArgv [ i ] ;
5049 if ( StringPrototypeStartsWith ( arg , '--watch=' ) ) {
5150 continue ;
5251 }
5352 if ( arg === '--watch' ) {
54- const nextArg = argsFromBinding [ i + 1 ] ;
53+ const nextArg = process . execArgv [ i + 1 ] ;
5554 if ( nextArg && nextArg [ 0 ] !== '-' ) {
5655 // If `--watch` doesn't include `=` and the next
5756 // argument is not a flag then it is interpreted as
0 commit comments