Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Oct 31, 2023
1 parent 14ea397 commit 5b2a81b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6983,7 +6983,10 @@ export const getPipFrozenTree = (basePath, reqOrSetupFile, tempVenvDir) => {
if (result.status !== 0 || result.error) {
if (DEBUG_MODE) {
console.log("Virtual env creation has failed");
if (result.error && result.error.includes("spawnSync python ENOENT")) {
if (
result.stderr &&
result.stderr.includes("spawnSync python ENOENT")
) {
console.log(
"Install suitable version of python or set the environment variable PYTHON_CMD."
);
Expand Down Expand Up @@ -7231,12 +7234,6 @@ export const getPipFrozenTree = (basePath, reqOrSetupFile, tempVenvDir) => {
for (const k of Object.keys(dependenciesMap)) {
dependenciesList.push({ ref: k, dependsOn: dependenciesMap[k] });
}
} else {
if (DEBUG_MODE) {
console.log(
"NOTE: Setup and activate a python virtual environment for this project prior to invoking cdxgen to improve SBOM accuracy."
);
}
}
return {
pkgList,
Expand Down

0 comments on commit 5b2a81b

Please sign in to comment.