We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54ff157 commit beaf837Copy full SHA for beaf837
lib/content-deployment.js
@@ -2,12 +2,14 @@ const cds = require("@sap/cds");
2
const { validateNotificationTypes, readFile } = require("./utils");
3
const { processNotificationTypes } = require("./notificationTypes");
4
const { setGlobalLogLevel } = require("@sap-cloud-sdk/util");
5
+const { basename } = require('path');
6
7
async function deployNotificationTypes() {
8
setGlobalLogLevel("error");
9
10
// read notification types
- const fileName = path.basename(cds.env.requires?.notifications?.types);
11
+ const filePath = cds.env.requires?.notifications?.types ?? '';
12
+ const fileName = basename(filePath);
13
const notificationTypes = readFile(fileName);
14
15
if (validateNotificationTypes(notificationTypes)) {
0 commit comments