cli: prevent --examples + --load as the latter bypasses the first

This commit is contained in:
jean-emmanuel 2016-12-03 11:38:44 +01:00
parent af30b32c72
commit 6881e8cfc9

View file

@ -42,7 +42,12 @@ var options = {
}
},
't':{alias:'theme',type:'array',describe:'theme name or path (mutliple values allowed)'},
'e':{alias:'examples',type:'boolean',describe:'list examples instead of recent sessions'}
'e':{alias:'examples',type:'boolean',describe:'list examples instead of recent sessions',
check: (e,argv)=>{
return (!argv.l) ?
true : 'examples can\'t be listed if --load is set'
}
}
}