Fix --config-location -

This commit is contained in:
pukkandan 2022-09-13 16:18:15 +05:30
parent 22df97f9c5
commit 1060f82f89
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

View File

@ -5554,6 +5554,9 @@ def load_configs(self):
self.parsed_args = self.own_args self.parsed_args = self.own_args
for location in opts.config_locations or []: for location in opts.config_locations or []:
if location == '-': 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') self.append_config(shlex.split(read_stdin('options'), comments=True), label='stdin')
continue continue
location = os.path.join(directory, expand_path(location)) location = os.path.join(directory, expand_path(location))