File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,9 @@ def cli_launcher() -> None:
271
271
if len ([c for c in candidates if c == "user_query" ]) == 1 :
272
272
query_index = candidates .index ("user_query" )
273
273
kwargs ["query" ] = args .pop (query_index )
274
- sys .argv .append (f"--query='{ kwargs ['query' ]} '" )
274
+ sys .argv [sys .argv .index (kwargs ["query" ])] = (
275
+ f"--query='{ kwargs ['query' ]} '"
276
+ )
275
277
candidates .pop (query_index )
276
278
277
279
if (
@@ -281,7 +283,7 @@ def cli_launcher() -> None:
281
283
and candidates [0 ]
282
284
):
283
285
kwargs ["path" ] = args .pop (0 )
284
- sys .argv . append ( f"--path='{ kwargs ['path' ]} '" )
286
+ sys .argv [ sys . argv . index ( kwargs [ "path" ])] = f"--path='{ kwargs ['path' ]} '"
285
287
286
288
# if args is not empty, we have not succesfully parsed everything
287
289
if args :
You can’t perform that action at this time.
0 commit comments