File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -122,10 +122,14 @@ def make_config_parser(
122
122
# read_file() before calling read() for any optional files."
123
123
# https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read
124
124
parser = configparser .ConfigParser ()
125
+ logger .info (f"Reading config file: { library_wide } " )
125
126
with library_wide .open () as file :
126
127
parser .read_file (file ) # necessary file
127
128
128
129
other_files = [user_wide , Path (custom_file ) if custom_file else folder_wide ]
130
+ for path in other_files :
131
+ if path .exists ():
132
+ logger .info (f"Reading config file: { path } " )
129
133
parser .read (other_files ) # optional files
130
134
131
135
return parser
Original file line number Diff line number Diff line change @@ -267,6 +267,12 @@ def write(level: str | None = None, openfile: bool = False) -> None:
267
267
268
268
@cfg .command (context_settings = cli_ctx_settings )
269
269
def show () -> None :
270
+ console .print ("CONFIG FILES READ" , style = "bold green underline" )
271
+ for path in config_file_paths ():
272
+ if path .exists ():
273
+ console .print (f"{ path } " )
274
+ console .print ()
275
+
270
276
parser = make_config_parser ()
271
277
rich_non_style_entries = [a .replace ("." , "_" ) for a in RICH_NON_STYLE_ENTRIES ]
272
278
for category in parser :
You can’t perform that action at this time.
0 commit comments