thesimj / envyaml

Simple YAML configuration file parser
MIT License
78 stars 21 forks source link

Escaping multiple dollar signs #31

Closed mgiamberardino closed 2 years ago

mgiamberardino commented 2 years ago

We are using this package for managing environment yaml files and we are facing a scenario where we need to have multiple dollar signs and all of them should be escaped:

user_one:
  username: some_user
  password: SomePa$$$word

Currently, the package is failing to parse this yaml since $word does not exist in the environment. After reading about escaping and testing the following values escaping each dollar sign:

user_one:
  username: some_user
  password: SomePa$$$$$$word

Now the password is having SomePa$word as a value.

After digging a bit into the code this seems to be an issue related to how content is getting replaced for escaped dollar signs.

I'll raise a PR with a solution proposal and refer to this issue.

mgiamberardino commented 2 years ago

@thesimj Sorry if this is not the way to ask for this but I don't have clear how the process to ask for a new release is. You recently merged my PR to the master branch so want to know when that release could be available.

Thanks

thesimj commented 2 years ago

hi, @mgiamberardino I will do an update as soon as posible. I will inform you here when the release will be ready. if you have practical knowledge of how to write Github Action and help with #35 I would appreciate this help. This will help to automate releases build/test/publish.

thesimj commented 2 years ago

@mgiamberardino test new version of library now.

mgiamberardino commented 2 years ago

@thesimj Thanks!