@@ -260,10 +260,14 @@ assert_config(Filename, Env) ->
260
260
{ok , _ } -> ok ;
261
261
{error , {1 , erl_parse , Err }} ->
262
262
{error , {" ERROR: Unable to parse erlang terms from ~s file: ~s~n "
263
- " Error: ~p~n "
264
- " Check that the file has the correct format. "
265
- " If you are using the new ini-style format, the file "
266
- " extension should be '.conf'~n " ,
263
+ " ERROR: Reason: ~p~n "
264
+ " ERROR: Check that the file is in the erlang terms format. " ++
265
+ case Env of
266
+ " RABBITMQ_CONFIG_FILE" ->
267
+ " If you are using the new ini-style format, the file "
268
+ " extension should be '.conf'~n " ;
269
+ _ -> " "
270
+ end ,
267
271
[Env , Filename , Err ]}};
268
272
{error , Err } ->
269
273
{error , {" ERROR Unable to parse erlang terms from ~s file: ~s~n "
@@ -281,9 +285,9 @@ assert_conf(Filename, Env) ->
281
285
true ->
282
286
case file :read_file (Filename ) of
283
287
{ok , <<" [" , _ /binary >>} ->
284
- {error , {" ERROR: wrong format of the config file ~s : ~s~n "
285
- " Check that the file is in the new ini-style config format "
286
- " If you are using the old format the file extension should"
288
+ {error , {" ERROR: Wrong format of the config file ~s : ~s~n "
289
+ " ERROR: Check that the file is in the new ini-style config format "
290
+ " If you are using the old format the file extension should "
287
291
" be .config~n " ,
288
292
[Env , Filename ]}};
289
293
_ ->
0 commit comments