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

yaml format is changed after update this file #2235

Open
yahliu opened this issue Dec 17, 2024 · 0 comments
Open

yaml format is changed after update this file #2235

yahliu opened this issue Dec 17, 2024 · 0 comments
Labels

Comments

@yahliu
Copy link

yahliu commented Dec 17, 2024

Describe the bug
A clear and concise description of what the bug is.

Note that any how to questions should be posted in the discussion board and not raised as an issue.

Version of yq: v4.44.5
Operating system: mac/linux
Installed via: homebrew/snap

Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
data1.yml:

compute:
- architecture: amd64
  hyperthreading: Enabled
  name: worker
  platform:
    aws:
      type: m6g.2xlarge
  replicas: 3
metadata:
  name: test

Command
The command you ran:

yq e -i '.metadata.name="test1" data1.yml

Actual behavior

compute:
  - architecture: arm64
    hyperthreading: Enabled
    name: worker
    platform:
      aws:
        type: m6g.2xlarge
    replicas: 3
metadata:
  name: test1

Expected behavior

compute:
- architecture: amd64
  hyperthreading: Enabled
  name: worker
  platform:
    aws:
      type: m6g.2xlarge
  replicas: 3
metadata:
  name: test1

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant