Skip to content

Arguments Incorrectly Parsed #228

@cawoodm

Description

@cawoodm

If I run supervisor script.js arg1 I expect it to run node script.js arg1 however it seems to be running node arg1.

$supervisor -- .\tests\script.js arg1

Running node-supervisor with
  program 'arg1'
  --watch '.'
  --extensions 'node,js'
  --exec 'node'

Starting child process with 'node arg1'
Watching directory 'C:\projects\order' for changes.
Press rs for restarting the process.
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module 'C:\projects\order\arg1'
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.12.1
Program node arg1 exited with code 1

Version: latest: 0.12.0

Possibly related to #191

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions