Skip to content

Commit beaf837

Browse files
author
Anmol Binani
committed
minor change
1 parent 54ff157 commit beaf837

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/content-deployment.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ const cds = require("@sap/cds");
22
const { validateNotificationTypes, readFile } = require("./utils");
33
const { processNotificationTypes } = require("./notificationTypes");
44
const { setGlobalLogLevel } = require("@sap-cloud-sdk/util");
5+
const { basename } = require('path');
56

67
async function deployNotificationTypes() {
78
setGlobalLogLevel("error");
89

910
// read notification types
10-
const fileName = path.basename(cds.env.requires?.notifications?.types);
11+
const filePath = cds.env.requires?.notifications?.types ?? '';
12+
const fileName = basename(filePath);
1113
const notificationTypes = readFile(fileName);
1214

1315
if (validateNotificationTypes(notificationTypes)) {

0 commit comments

Comments
 (0)