Skip to content

Commit

Permalink
Specify atom java home
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Jan 2, 2025
1 parent 10dd751 commit 2a2f6e9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/snapshot-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ jobs:
run: |
source .venv/bin/activate
python test/diff/generate.py
env:
ATOM_JAVA_HOME: /usr/lib/jvm/java-21-openjdk-amd64
- name: Upload shell scripts generated as artifact
uses: actions/upload-artifact@v4
with:
Expand Down
9 changes: 9 additions & 0 deletions lib/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3058,6 +3058,15 @@ export async function createPythonBom(path, options) {
pkgList = pkgList.concat(retMap.pkgList);
pkgList = trimComponents(pkgList);
}
// Retain the parent hierarchy
if (retMap?.parentComponent?.components?.length) {
if (!parentComponent.components) {
parentComponent.components = [];
}
parentComponent.components = parentComponent.components.concat(
retMap?.parentComponent?.components,
);
}
if (retMap.dependenciesList?.length) {
dependencies = mergeDependencies(
dependencies,
Expand Down
6 changes: 5 additions & 1 deletion lib/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4671,6 +4671,7 @@ export async function parsePyLockData(lockData, lockFile, pyProjectFile) {
});
}
return {
parentComponent,
pkgList,
rootList,
dependenciesList,
Expand Down Expand Up @@ -11097,7 +11098,10 @@ export function executeAtom(src, args) {
const env = {
...process.env,
};

// Atom requires Java >= 21
if (process.env?.ATOM_JAVA_HOME) {
env.JAVA_HOME = process.env.ATOM_JAVA_HOME;
}
if (isWin) {
env.PATH = `${env.PATH || env.Path}${_delimiter}${join(
dirNameStr,
Expand Down
2 changes: 1 addition & 1 deletion types/lib/cli/index.d.ts.map

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

2 changes: 2 additions & 0 deletions types/lib/helpers/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,11 @@ export function parsePyProjectTomlFile(tomlFile: string): any;
export function parsePyLockData(lockData: any, lockFile: string, pyProjectFile: string): Promise<{
pkgList: any[];
dependenciesList: any[];
parentComponent?: undefined;
rootList?: undefined;
workspaceWarningShown?: undefined;
} | {
parentComponent: any;
pkgList: any[];
rootList: {
name: any;
Expand Down
2 changes: 1 addition & 1 deletion types/lib/helpers/utils.d.ts.map

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

0 comments on commit 2a2f6e9

Please sign in to comment.