Skip to content

Avoid invoking PLIST parser for env vars#57

Merged
djones6 merged 1 commit intomasterfrom
issue.55
Jan 17, 2019
Merged

Avoid invoking PLIST parser for env vars#57
djones6 merged 1 commit intomasterfrom
issue.55

Conversation

@djones6
Copy link
Copy Markdown
Contributor

@djones6 djones6 commented Jan 15, 2019

Description

Ensures that environment variables are only parsed with the JSON deserializer.

Motivation and Context

The current code attempts to parse each environment variable using the JSON deserializer and then the PLIST deserializer, before finally returning the value as-is. This works, but is a bit unnecessary since it seems highly unlikely that someone would store structured data in PLIST format in an environment variable.

Worse, if the value contains a semicolon, the PLIST deserializer writes a messy error message directly to stdout, which we cannot suppress. This PR prevents this by specifying only the JSON deserializer when processing env vars.

Resolves #55

How Has This Been Tested?

The existing tests pass.

Checklist:

  • I have submitted a CLA form
  • If applicable, I have updated the documentation accordingly.
  • If applicable, I have added tests to cover my changes.

@djones6 djones6 merged commit 4278530 into master Jan 17, 2019
@djones6 djones6 deleted the issue.55 branch January 17, 2019 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated projects producing warning messages

2 participants