-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
[Gradle] SBOM generation didn't work on Windows #1615
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Roland Asmann <roland.asmann@gmail.com>
Signed-off-by: Roland Asmann <roland.asmann@gmail.com>
Signed-off-by: Roland Asmann <roland.asmann@gmail.com>
Signed-off-by: Roland Asmann <roland.asmann@gmail.com>
} | ||
} | ||
allOutputs.push(result.stdout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are we handling the case where stdout could be null?
"--build-cache", | ||
"--console", | ||
"plain", | ||
"--no-parallel", | ||
].concat(gradleArguments); | ||
const maxCliArgsLength = isWin | ||
? 7500 - gradleCommandLength - mainGradleArguments.join(" ").length - 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 7500 the maximum gradle supports on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with creating a temporary powershell script and executing the same if it could yield good performance instead of batching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't thought about that yet. Let me check that out, it might make this, and your question above, moot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just can't figure out how to get powershell to return the output... @prabhu, do you have any idea/experience with powershell?
cdxgen didn't generate SBOM for Gradle on Windows. This PR fixes this.
Since Windows also has a maximum character count in the CLI, this was also fixed. This unfortunately means that generating a gradle SBOM on Windows could be slower, because we potentially have to run multiple commands instead of just the one!