options: use existsSync to check files
This commit is contained in:
parent
2b529bc19d
commit
0d9832144d
1 changed files with 3 additions and 3 deletions
|
|
@ -9,17 +9,17 @@ module.exports = {
|
|||
},
|
||||
'l': {alias: 'load', type: 'string', file: {name: 'OSC Session (.json)', extensions: ['json', 'js']}, describe: 'session file to load',
|
||||
check: (arg)=>{
|
||||
return fs.lstatSync(arg) ? true : 'Session file not found: ' + arg
|
||||
return fs.existsSync(arg) ? true : 'Session file not found: ' + arg
|
||||
}
|
||||
},
|
||||
'state': {type: 'string', file: {name: 'OSC State (.state)', extensions: ['state']}, describe: 'state file to load',
|
||||
check: (arg)=>{
|
||||
return fs.lstatSync(arg) ? true : 'State file not found: ' + arg
|
||||
return fs.existsSync(arg) ? true : 'State file not found: ' + arg
|
||||
}
|
||||
},
|
||||
'c': {alias: 'custom-module', type: 'array', file: {name: 'OSC Custom module (.js)', extensions: ['js']}, describe: 'custom module file to load (custom options can be passed after the filename)',
|
||||
check: (arg)=>{
|
||||
return fs.lstatSync(arg[0]) ? true : 'Custom module file not found: ' + arg
|
||||
return fs.existsSync(arg[0]) ? true : 'Custom module file not found: ' + arg
|
||||
},
|
||||
},
|
||||
'p': {alias: 'port', type: 'number', describe: 'http port of the server (default to 8080)',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue