--on-change-only / -C seemingly does nothing
See original GitHub issuenodemon -v
: 2.0.4node -v
: v12.17.0- Operating system/terminal environment: Ubuntu 20.04
- Command you ran:
nodemon -C some-script.js
Expected behaviour
some-script.js not being executed on startup. Please correct me if this is a misunderstanding on my part!
Actual behaviour
some-script.js is executed on startup.
Steps to reproduce
- Install
nodemon
. - Create any sort of script, for example something that simply logs “Hello!” to the console.
- Run
nodemon -C script-name-here.js
.
Details
[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
--------------
node: v12.17.0
nodemon: 2.0.4
command: /home/johannes/.local/bin/node /home/johannes/dev/project/node_modules/nodemon/bin/nodemon.js -C --dump some-script.js
cwd: /home/johannes/dev/project
OS: linux x64
--------------
{
run: false,
system: { cwd: '/home/johannes/dev/project' },
required: false,
dirs: [ '/home/johannes/dev/project' ],
timeout: 1000,
options: {
runOnChangeOnly: true,
dump: true,
ignore: [
'**/.git/**',
'**/.nyc_output/**',
'**/.sass-cache/**',
'**/bower_components/**',
'**/coverage/**',
'**/node_modules/**',
re: /.*.*\/\.git\/.*.*|.*.*\/\.nyc_output\/.*.*|.*.*\/\.sass\-cache\/.*.*|.*.*\/bower_components\/.*.*|.*.*\/coverage\/.*.*|.*.*\/node_modules\/.*.*/
],
watch: [ '*.*', re: /.*\..*/ ],
monitor: [
'*.*',
'!**/.git/**',
'!**/.nyc_output/**',
'!**/.sass-cache/**',
'!**/bower_components/**',
'!**/coverage/**',
'!**/node_modules/**'
],
ignoreRoot: [
'**/.git/**',
'**/.nyc_output/**',
'**/.sass-cache/**',
'**/bower_components/**',
'**/coverage/**',
'**/node_modules/**'
],
restartable: 'rs',
colours: true,
execMap: { py: 'python', rb: 'ruby', ts: 'ts-node' },
stdin: true,
verbose: false,
signal: 'SIGUSR2',
stdout: true,
watchOptions: {},
execOptions: {
script: 'some-script.js',
exec: 'node',
args: [],
scriptPosition: 0,
nodeArgs: undefined,
execArgs: [],
ext: 'js,mjs,json',
env: {}
}
},
load: [Function],
reset: [Function: reset],
lastStarted: 0,
loaded: [],
watchInterval: null,
signal: 'SIGUSR2',
command: {
raw: { executable: 'node', args: [ 'some-script.js' ] },
string: 'node some-script.js'
}
}
--------------
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Diff - platform/hardware/invensense - Google Git
-0,0 +1,183 @@ +# Copyright (C) 2008 The Android Open Source Project +# +# ... Yamaha device with prefix name '%s' - "...
Read more >html <input type="text" /> onchange event not working
onchange only occurs when the change to the input element is committed by the user, most of the time ... jQuery has nothing...
Read more >HTML onchange Attribute - W3Schools
Definition and Usage. The onchange attribute fires the moment when the value of the element is changed. Tip: This event is similar to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Found the root cause of the issue. Will be submitting a Pull Request (https://github.com/remy/nodemon/pull/1751) with the fix.
Also it was not caught by the tests because the test was never actually executed under test/monitor/run.test.js.
Commenting to reopen the issue