From 1060f82f899b61a0a1c63df37ecdf6dc2bae50e8 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Tue, 13 Sep 2022 16:18:15 +0530 Subject: [PATCH] Fix `--config-location -` --- yt_dlp/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 666ef67ff..25910ed6c 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -5554,6 +5554,9 @@ class Config: self.parsed_args = self.own_args for location in opts.config_locations or []: if location == '-': + if location in self._loaded_paths: + continue + self._loaded_paths.add(location) self.append_config(shlex.split(read_stdin('options'), comments=True), label='stdin') continue location = os.path.join(directory, expand_path(location))