From 6881e8cfc971342ef83bc0109669e1a8b08a30a0 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 3 Dec 2016 11:38:44 +0100 Subject: [PATCH] cli: prevent --examples + --load as the latter bypasses the first --- app/main/settings.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/main/settings.js b/app/main/settings.js index 4b0f8d7d..5815e751 100644 --- a/app/main/settings.js +++ b/app/main/settings.js @@ -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' + } + } }