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(
122122 # read_file() before calling read() for any optional files."
123123 # https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read
124124 parser = configparser .ConfigParser ()
125+ logger .info (f"Reading config file: { library_wide } " )
125126 with library_wide .open () as file :
126127 parser .read_file (file ) # necessary file
127128
128129 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 } " )
129133 parser .read (other_files ) # optional files
130134
131135 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:
267267
268268@cfg .command (context_settings = cli_ctx_settings )
269269def 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+
270276 parser = make_config_parser ()
271277 rich_non_style_entries = [a .replace ("." , "_" ) for a in RICH_NON_STYLE_ENTRIES ]
272278 for category in parser :
You can’t perform that action at this time.
0 commit comments