-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
--on-change-only / -C seemingly does nothing #1742
Copy link
Copy link
Closed
Labels
Description
nodemon -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'
}
}
--------------
Reactions are currently unavailable