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

yq does not recognise unclosed with( / unclosed with( with --inplace clear the file contents #1366

Closed
landure opened this issue Sep 25, 2022 · 2 comments
Labels

Comments

@landure
Copy link

landure commented Sep 25, 2022

When using with(), and not closing the parenthesis, yq does not throw an error, and try to apply the command. This result in a empty file.

Version of yq: 4.27.5
Operating system: Ubuntu 22.04 Jammy Jellyfish
Installed via: binary release

Input file

docker-compose.yml:

services:
  beehive: {}

Command

command yq --inplace 'eval' 'with(.services.beehive.restart;
    . |= "unless-stopped"
    | . line_comment="Restart the service on failure."' \
    docker-compose.yml"```

Actual behavior

# empty file #

Expected behavior

Syntax Error: unclosed with.
@mikefarah
Copy link
Owner

Thanks - will fix in the next release

@mikefarah
Copy link
Owner

Fixed in 4.28.2

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

2 participants