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

Restart is not triggered for files in a directory. #1269

Closed
brkc opened this issue Feb 26, 2018 · 7 comments
Closed

Restart is not triggered for files in a directory. #1269

brkc opened this issue Feb 26, 2018 · 7 comments
Labels

Comments

@brkc
Copy link

brkc commented Feb 26, 2018

  • nodemon -v: 1.15.1
  • node -v: v8.9.4
  • Operating system/terminal environment: Windows 10 Pro x64 / cmd
  • Command you ran: nodemon -C --watch broken\touchme.txt --exec "echo changed"

Expected behaviour

When I change the file, it prints "changed".

Actual behaviour

It does not print "changed".


This works in 1.14.12.

> npx [email protected] -C --watch broken\touchme.txt --exec "echo changed"
...
[nodemon] 1.14.12
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: broken\touchme.txt
[nodemon] restarting due to changes...
[nodemon] starting `echo changed`
changed
[nodemon] clean exit - waiting for changes before restart

It does nothing in 1.15.1.

> npx [email protected] -C --watch broken\touchme.txt --exec "echo changed"
...
[nodemon] 1.15.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: broken\touchme.txt
@remy
Copy link
Owner

remy commented Feb 26, 2018

I think this might be a dupe issue. Don't have my laptop to hand to confirm though.

@brkc
Copy link
Author

brkc commented Feb 26, 2018

In any case, here's some additional debug info in case it's helpful.

1.14.12

> cross-env DEBUG=nodemon:* npx [email protected] --verbose -C --watch broken\touchme.txt --exec "echo changed"
...
[nodemon] 1.14.12
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 14248 to restart
[nodemon] watching: broken\touchme.txt
[nodemon] watching extensions: js,mjs,json
[nodemon] spawning
[nodemon] child pid: 24048
  nodemon:watch watching dir: broken\touchme.txt +0ms
[nodemon] watching 1 file
[nodemon] files triggering change check: Broken\touchme.txt
  nodemon:watch filterAndRestart on [ 'Broken\\touchme.txt' ] +10s
  nodemon:match rules [ '!**\\**/.git/**',
  '!**\\**/.nyc_output/**',
  '!**\\**/.sass-cache/**',
  '!**\\**/bower_components/**',
  '!**\\**/coverage/**',
  '!**\\**/node_modules/**',
  '**\\broken\\touchme.txt' ] +0ms
  nodemon:match match C:\w\test\Broken\touchme.txt true +8ms
[nodemon] matched rule: **\broken\touchme.txt
  nodemon:match good [] +3ms
  nodemon:watch matched? {"result":["c:\\w\\test\\Broken\\touchme.txt"],"ignored":0,"watched":1,"total":1} +18ms
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] Broken\touchme.txt

[nodemon] starting `echo changed`
[nodemon] spawning
[nodemon] child pid: 22260
  nodemon:watch early exit on watch, still watching (1) +119ms
[nodemon] files triggering change check: Broken\touchme.txt
  nodemon:watch filterAndRestart on [ 'Broken\\touchme.txt' ] +2ms
  nodemon:match rules [ '!**\\**/.git/**',
  '!**\\**/.nyc_output/**',
  '!**\\**/.sass-cache/**',
  '!**\\**/bower_components/**',
  '!**\\**/coverage/**',
  '!**\\**/node_modules/**',
  '**\\broken\\touchme.txt' ] +125ms
  nodemon:match match C:\w\test\Broken\touchme.txt true +3ms
[nodemon] matched rule: **\broken\touchme.txt
  nodemon:match good [] +3ms
  nodemon:watch matched? {"result":["c:\\w\\test\\Broken\\touchme.txt"],"ignored":0,"watched":1,"total":1} +8ms
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] Broken\touchme.txt

changed
[nodemon] starting `echo changed`
[nodemon] spawning
[nodemon] child pid: 16808
  nodemon:watch early exit on watch, still watching (1) +614ms
changed
[nodemon] clean exit - waiting for changes before restart

1.15.1

> cross-env DEBUG=nodemon:* npx [email protected] --verbose -C --watch broken\touchme.txt --exec "echo changed"
...
[nodemon] 1.15.1
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 3020 to restart
[nodemon] watching: broken\touchme.txt
[nodemon] watching extensions: js,mjs,json
[nodemon] spawning
[nodemon] child pid: 7276
  nodemon:watch watching dir: touchme.txt +0ms
  nodemon:watch watching dir: touchme2.txt +12ms
[nodemon] watching 2 files
[nodemon] files triggering change check: ..\Touchme.txt
  nodemon:watch filterAndRestart on [ 'broken\\Touchme.txt' ] +55s
  nodemon:match rules [ '!**\\**/.git/**',
  '!**\\**/.nyc_output/**',
  '!**\\**/.sass-cache/**',
  '!**\\**/bower_components/**',
  '!**\\**/coverage/**',
  '!**\\**/node_modules/**',
  '**\\broken\\touchme.txt' ] +0ms
  nodemon:match match C:\w\test\broken\Touchme.txt true +5ms
[nodemon] matched rule: **\broken\touchme.txt
  nodemon:match good [ 'C:\\w\\test\\broken\\Touchme.txt' ] +3ms
  nodemon:watch matched? {"result":[],"ignored":0,"watched":1,"total":1} +15ms
[nodemon] changes after filters (before/after): 1/0

@remy
Copy link
Owner

remy commented Feb 26, 2018

Going to close this as a dupe of #1251. Your reported error is pretty much the same, and I'm pretty certain it's caused by the same code change, so if you don't mind, we'll track it there 👍

@remy
Copy link
Owner

remy commented Feb 26, 2018

…hmm, actually, I'm going to re-open this issue. I'm digging more into the detail you've included and I'm starting to believe this isn't a dupe, but something else.

@remy remy reopened this Feb 26, 2018
@remy remy added windows bug confirmed bug labels Feb 26, 2018
@remy
Copy link
Owner

remy commented Feb 26, 2018

@brkc I've just pushed a tweaked version with a minor change, but windows specific. In lieu of me getting my windows machine running tomorrow, can you give it a test using npm i -g nodemon@debug - it should resolve with [email protected] - and just repeat your test case.

@remy
Copy link
Owner

remy commented Feb 27, 2018

Okay, I think I know what the -C change is - I tried to change too much in one go (to make it test'able, but I don't think I needed it anyway).

I'll tidy it up and package for release tomorrow.

@remy remy added the has PR label Feb 27, 2018
@brkc
Copy link
Author

brkc commented Feb 28, 2018

Sorry, forgot to close this for you. Looks good!

@brkc brkc closed this as completed Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants