Skip to content

Commit

Permalink
fix: only use apps from deps if
Browse files Browse the repository at this point in the history
only show the apps that are included in the dependencies of the package.json when  is present
  • Loading branch information
marianfoo committed Jan 29, 2024
1 parent cd401a5 commit 1b386d3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,12 @@ export class cds_launchpad_plugin{
// Read CDS project package
const packagejson = JSON.parse(fs.readFileSync(cds.root + '/package.json').toString());
let depsPaths = [];
try {
({ depsPaths } = this.getAppsFromDependencies(packagejson));
} catch (error) {
cdsLaunchpadLogger.error(`Error while reading dependencies: ${error}`);
if (cds.env?.plugins !== undefined && cds.env?.plugins['cds-plugin-ui5']) {
try {
({ depsPaths } = this.getAppsFromDependencies(packagejson));
} catch (error) {
cdsLaunchpadLogger.error(`Error while reading dependencies: ${error}`);
}
}

if(Array.isArray(packagejson.sapux)){
Expand Down

0 comments on commit 1b386d3

Please sign in to comment.