Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested multiline indenting is wrong #198

Open
askripe opened this issue Jan 23, 2024 · 0 comments
Open

nested multiline indenting is wrong #198

askripe opened this issue Jan 23, 2024 · 0 comments

Comments

@askripe
Copy link

askripe commented Jan 23, 2024

versions:

% ~/bin/vals version
Version: dev
Git Commit:
% git log 
commit b752901de38611c9c292e9c626fb80f816f86e10 (HEAD -> main, tag: v0.33.0, origin/main, origin/HEAD)
Author: Antoine Miquel <[email protected]>
Date:   Sun Jan 21 03:02:01 2024 +0100

    Feat/conjur (#195)

    * feat: add conjur provider
...

problem:
nested multilines are not parsed correctly, indenting is wrong (it is selected by first "|" symbol, not the nested one )

% cat 1.yaml
a: |
  v:
    a: |
      l: ue
      a: c
% cat 2.yaml
a: |
  v:
    a: |
      ref+vault://configs/tests.github#/-
% vault kv get --field='-' 'configs/tests.github'
l: ue
a: c

% cat 2.yaml|~/bin/vals eval -f -
a: |
  v:
    a: |
      l: ue
  a: c

real effort:

% cat 1.yaml |~/bin/vals eval -f - |yq -e ".a" |yq -e ".v.a"
l: ue
a: c
% cat 2.yaml |~/bin/vals eval -f - |yq -e ".a" |yq -e ".v.a"
l: ue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant