5858 format of CF defining too, and each path should be in a single line.
5959 """
6060)
61+ @option (
62+ "--config" ,
63+ "-c" ,
64+ help = """
65+ The charon configuration yaml file path. Default is
66+ $HOME/.charon/charon.yaml
67+ """
68+ )
6169@option (
6270 "--debug" ,
6371 "-D" ,
@@ -79,6 +87,7 @@ def invalidate(
7987 target : str ,
8088 paths : List [str ],
8189 path_file : str ,
90+ config : str = None ,
8291 quiet : bool = False ,
8392 debug : bool = False
8493):
@@ -110,7 +119,7 @@ def invalidate(
110119 break
111120
112121 try :
113- (buckets , aws_profile ) = _init_cmd (target )
122+ (buckets , aws_profile ) = _init_cmd (target , config )
114123
115124 for b in buckets :
116125 cf_client = CFClient (aws_profile = aws_profile )
@@ -144,6 +153,14 @@ def invalidate(
144153 """ ,
145154 required = True
146155)
156+ @option (
157+ "--config" ,
158+ "-c" ,
159+ help = """
160+ The charon configuration yaml file path. Default is
161+ $HOME/.charon/charon.yaml
162+ """
163+ )
147164@option (
148165 "--debug" ,
149166 "-D" ,
@@ -164,6 +181,7 @@ def invalidate(
164181def check (
165182 invalidation_id : str ,
166183 target : str ,
184+ config : str = None ,
167185 quiet : bool = False ,
168186 debug : bool = False
169187):
@@ -175,7 +193,7 @@ def check(
175193 is_quiet = quiet , is_debug = debug , use_log_file = False
176194 )
177195 try :
178- (buckets , aws_profile ) = _init_cmd (target )
196+ (buckets , aws_profile ) = _init_cmd (target , config )
179197 if not buckets :
180198 sys .exit (1 )
181199
@@ -203,8 +221,8 @@ def check(
203221 sys .exit (2 )
204222
205223
206- def _init_cmd (target : str ) -> Tuple [List [Tuple [str , str , str , str , str ]], str ]:
207- conf = get_config ()
224+ def _init_cmd (target : str , config : str ) -> Tuple [List [Tuple [str , str , str , str , str ]], str ]:
225+ conf = get_config (config )
208226 if not conf :
209227 sys .exit (1 )
210228
0 commit comments