Can't encrypt if YAML contains alias with array
mtsmfm opened this issue · 1 comments
mtsmfm commented
I found this tool can't encrypt the following yaml with -k '$.a.c'
x: &x string
a:
b:
- *x
c: hi
Demo
$ cat ok.yml
x: &x string
a:
b:
- x
c: hi
$ bundle exec yaml_vault encrypt ok.yml -k '$.a.c' -o /dev/stdout
Enter passphrase:
encrypted ok.yml -> /dev/stdout
x: &x string
a:
b:
- x
c: V3p3dlF1RXY2dkVlZ1V5U1UxbEhxUT09LS1ZZ2pHL0VrcnQranA0RWFoZjhPcnJ3PT0=--978ffaf2aa9739274734ea4ed9017d106b425f8532d23747c1262570bb8e29af
$ cat ng.yml
x: &x string
a:
b:
- *x
c: hi
$ bundle exec yaml_vault encrypt ng.yml -k '$.a.c' -o /dev/stdout
Enter passphrase:
encrypted ng.yml -> /dev/stdout
x: &x string
a:
b:
- *x
c: hi
joker1007 commented
Thank you for your reporting! and I'm sorry for late fixing.