yamlfix crashes when run.
Crashes.
[+] Fixed solutions/guardrails-policies/12-cloud-market-place/constraint.yaml
Traceback (most recent call last):
File "/home/bain/.local/bin/yamlfix", line 8, in <module>
sys.exit(cli())
File "/home/bain/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/bain/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/bain/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/bain/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/bain/.local/lib/python3.10/site-packages/yamlfix/entrypoints/cli.py", line 86, in cli
fixed_code, changed = services.fix_files(files_to_fix, check, config)
File "/home/bain/.local/lib/python3.10/site-packages/yamlfix/services.py", line 82, in fix_files
fixed_source = fix_code(source, config)
File "/home/bain/.local/lib/python3.10/site-packages/yamlfix/services.py", line 154, in fix_code
source_code = fixer.fix(source_code=source_code)
File "/home/bain/.local/lib/python3.10/site-packages/yamlfix/adapters.py", line 362, in fix
source_code = fixer(source_code)
File "/home/bain/.local/lib/python3.10/site-packages/yamlfix/adapters.py", line 380, in _ruamel_yaml_fixer
for source_dict in source_dicts:
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/main.py", line 477, in load_all
yield constructor.get_data()
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 134, in get_data
return self.construct_document(self.composer.get_node())
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 151, in construct_document
for _dummy in generator:
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 1627, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 1506, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 174, in construct_object
data = self.construct_non_recursive_object(node)
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 216, in construct_non_recursive_object
for _dummy in generator:
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 1627, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 1506, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 174, in construct_object
data = self.construct_non_recursive_object(node)
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 216, in construct_non_recursive_object
for _dummy in generator:
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 1627, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 1507, in construct_mapping
if self.check_mapping_key(node, key_node, maptyp, key, value):
File "/home/bain/.local/lib/python3.10/site-packages/ruyaml/constructor.py", line 314, in check_mapping_key
raise DuplicateKeyError(*args)
ruyaml.constructor.DuplicateKeyError: while constructing a mapping
in "<unicode string>", line 20, column 5:
config.kubernetes.io/local-confi ...
^ (line: 20)
found duplicate key "config.kubernetes.io/local-config" with value "true" (original value: "true")
in "<unicode string>", line 21, column 5:
config.kubernetes.io/local-confi ...
^ (line: 21)
To suppress this check see:
http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
bain@DESKTOP-N2H6GLJ:~/pubsec-declarative-toolkit$