Skip to content

ruamel sometimes saves with extra "-" #14

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

Open
vsoch opened this issue Oct 24, 2022 · 2 comments
Open

ruamel sometimes saves with extra "-" #14

vsoch opened this issue Oct 24, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@vsoch
Copy link
Owner

vsoch commented Oct 24, 2022

Describe the bug

I don't know how to reproduce this (yet) but sometimes ruamel saves a file with an added "-" e.g.

on:
-  schedule:
+  schedule: -
    cron: "xxxxx"

And the only fix is to manually delete it. This is obviously a bug!

@vsoch vsoch added the bug Something isn't working label Oct 24, 2022
@vsoch
Copy link
Owner Author

vsoch commented Oct 24, 2022

I think it could be based on what it determines to be a commented (text) block vs. a dictionary, where the first has more than some expected number of spaces.

@vsoch
Copy link
Owner Author

vsoch commented Oct 24, 2022

okay I think I know what's happening - it's a list that it moves to the previous line, so instead of a list of dicts (correct) it is read as a text extended (with dict content). I had to do a fix here: singularityhub/singularity-hpc#610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant