[BUG] Quotes are getting added to the value if it contains spaces.
shishiranshuman opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
After writing the contents back to the file, the quotes are added to the values that have spaces.
For instance, the following contents of the file is read:
credential_process = /opt/bin/awscreds-custom --username helen
And after writing the contents back to the file, this is how it looks:
credential_process = "/opt/bin/awscreds-custom --username helen"
I used the AWS config file as an example.
Expected Behavior
The quotes must not be added to the values.
Steps To Reproduce
- Create a file with some key-value pairs. Make sure to add multiple words or spaces to the values.
- Parse the file contents using
ini.parse()
- Now, write the same file contents back to the file. Use
ini.stringify()
to encode.
Environment
- npm: 8.14.0
- Node: 16.16.0
- OS: macOS Monterey 12.4
- platform: Macbook Pro
- ini: 3.0.0
Running into same issue.
Can we get this changed? Or perhaps an option could be added to EncodeOptions
to control behavior?