Pass the `usePolling` flag to Chokidar when in legacy mode, which is supposed to/hopefully fix containers watching network attached drives.
Fixes#639Fixes#633
This was copied and pasted more than a handful of times around the
library and tests. Some implementations were more naive and did not
try to add quotes if there are spaces within a single argument.
There is one slight oddity in one of the cli parse tests. Stringifying
the command causes many of the arguments to show up in quotes when they
probably shouldn't. This seems to trace back to a deep problem related
to how commands are pulled out of package.scripts.start and is out of
scope for this patch. Even though the test might look incorrect now, it
is an accurate reflection of what the generated command is.
Previously, the --nodejs flag was being prepended if you had any
arguments prefixed with '--', even if they were intended for your
application. There is an additional problem where arguments intended for
node js need to be grouped into a single argument passed after --nodejs.
After this patch, any flag before your script is considered a nodejs
argument. These, along with any other exec arguments are bundled into a
single argument separated by spaces.
Fixes#530
If you try to run nodemon with a coffee file script and pass an
argument to your application, it is instead adding a --nodejs when there
are no node flags to pass along. This causes the command to fail because
the script name is now passed as a flag to node.
Repro:
nodemon script.coffee --my-argument
Expected:
coffee script.coffee --my-argument
Actual:
coffee --nodejs script.coffee --my-argument
Related to #530
- Also update tests to check end value, not individual parts
- Simplify tests to check actual output, rather than the pieces that make the output
- Remove redundant code: such a shame, it was cool code, but I'd rather remove it for simplicity and better support. Woot.
Full tests need to run to work out if this is okay to merge, but the logic is that we only go to the package.json for an executable IIF there's no script. If there's a script, then we shouldn't need to discover anything and we'll let the logic fall through the usual path (and usually default to node).