Skip to content

Commit

Permalink
fix: only use apps from deps if cds-plugin-ui5 is present (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
marianfoo authored Jan 29, 2024
1 parent cd401a5 commit 41be0e2
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 41be0e2

Please sign in to comment.