Skip to content

Commit e9f5f3b

Browse files
Ignore comments when writing JSON output in WinGet DSC v3 resources (#5445)
<!-- To check a checkbox place an "x" between the brackets. e.g: [x] --> - [ ] I have signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs). - [ ] This pull request is related to an issue. ----- ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/5445)
1 parent bdd2cab commit e9f5f3b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/AppInstallerCLICore/Commands/DscCommandBase.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ namespace AppInstaller::CLI
307307
{
308308
Json::StreamWriterBuilder writerBuilder;
309309
writerBuilder.settings_["indentation"] = "";
310+
writerBuilder.settings_["commentStyle"] = "None";
311+
writerBuilder.settings_["emitUTF8"] = true;
310312
context.Reporter.Json() << Json::writeString(writerBuilder, value) << std::endl;
311313
}
312314
}

0 commit comments

Comments
 (0)