Skip to content

Validating JSON Properties File Reads Prior to Processing - #2375

Merged
sergei (vors) merged 2 commits into
PowerShell:masterfrom
mirichmo:mirichmo/validating-properties-reads
Sep 28, 2016
Merged

sergei (vors) merged 2 commits into
PowerShell:masterfrom
mirichmo:mirichmo/validating-properties-reads

Conversation

@mirichmo

Copy link
Copy Markdown
Member

Fixes #2342 and #2346

  1. I added an additional sanity check to the JSON file processing during reads to better handle empty files such as "{}".
  2. I Refactored the ExecutionPolicy tests to centralize them in the new location, remove duplication, and handle windows vs. non-windows execution using the new try-catch technique.

@msftclas

Hi Mike Richmond (@mirichmo), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Mike Richmond). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@mirichmo

Copy link
Copy Markdown
Member Author

sergei (@vors) Please review

@vors

Copy link
Copy Markdown
Collaborator

I'm curious, why the whole
files changed? It could be due to tab vs spaces or line ends. Can you check?

@mirichmo

Copy link
Copy Markdown
Member Author

I'm not quite sure what you mean. I moved a bunch of ExecutionPolicy tests from engine\ExecutionPolicy.Tests.ps1 to modules\Microsoft.powershell.security\ExecutionPolicy.Tests.ps1. I also removed duplicate tests from engine\ExecutionPolicy.Tests.ps1.

@vors
sergei (vors) merged commit f45c6f2 into PowerShell:master Sep 28, 2016
@mirichmo
Mike Richmond (mirichmo) deleted the mirichmo/validating-properties-reads branch September 28, 2016 18:32
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…properties-reads

Validating JSON Properties File Reads Prior to Processing
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.

3 participants