Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: nuget plugin writes messages to stderr #5410

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"snyk-mvn-plugin": "3.5.0",
"snyk-nodejs-lockfile-parser": "1.58.7",
"snyk-nodejs-plugin": "1.3.2",
"snyk-nuget-plugin": "2.7.4",
"snyk-nuget-plugin": "2.7.6",
"snyk-php-plugin": "1.9.2",
"snyk-policy": "^1.25.0",
"snyk-python-plugin": "2.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,8 @@ describe('`snyk test` of basic projects for each language/ecosystem', () => {
// libraries.
expect([0, 1]).toContain(code);

// Note: dotnet plugin can print a warning about runtime resolution, which breaks JSON output.
// This replacement regex is a temporary workaround until the dotnet plugin can be fixed.
const sanitizedStdout = stdout.replace(/^[\s\S]*?{/, '{');
const result = JSON.parse(sanitizedStdout);
// Checking if the JSON output is correctly defined and is not poluted with user facing messages.
const result = JSON.parse(stdout);
expect(result?.ok).toBeDefined();

// Expect 'ok' to be true if exit 0, false if exit 1.
Expand Down
Loading