File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import { repl, replProcessAnswer } from './repl/core';
2727import { printVersionInformation } from './repl/commands/repl-version' ;
2828import { printVersionRepl } from './repl/print-version' ;
2929import { defaultConfigFile , flowrMainOptionDefinitions , getScriptsText } from './flowr-main-options' ;
30+ import fs from 'fs' ;
3031
3132export const toolName = 'flowr' ;
3233
@@ -87,6 +88,13 @@ if(options['config-json']) {
8788 }
8889}
8990if ( ! usedConfig ) {
91+ if ( options [ 'config-file' ] ) {
92+ // validate it exists
93+ if ( ! fs . existsSync ( options [ 'config-file' ] ) ) {
94+ log . error ( `Config file '${ options [ 'config-file' ] } ' does not exist` ) ;
95+ process . exit ( 1 ) ;
96+ }
97+ }
9098 setConfigFile ( options [ 'config-file' ] ?? defaultConfigFile , undefined , true ) ;
9199}
92100
You can’t perform that action at this time.
0 commit comments