This commit is contained in:
Benjamin Toby
2025-07-20 07:00:09 +01:00
parent 3437be2c08
commit a429436939
9 changed files with 55 additions and 7 deletions
+4 -2
View File
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.default = grabDbSSL;
const fs_1 = __importDefault(require("fs"));
const grab_dir_names_1 = __importDefault(require("./names/grab-dir-names"));
const path_1 = __importDefault(require("path"));
/**
* # Grab SSL
*/
@@ -16,10 +17,11 @@ function grabDbSSL() {
maxscaleSSLCaCertFileFinal = maxscaleSSLCaCertFile;
}
catch (error) { }
const caFilePath = process.env.DSQL_SSL_CA_CERT || maxscaleSSLCaCertFileFinal;
if (!(caFilePath === null || caFilePath === void 0 ? void 0 : caFilePath.match(/./))) {
const caProivdedPath = process.env.DSQL_SSL_CA_CERT || maxscaleSSLCaCertFileFinal;
if (!(caProivdedPath === null || caProivdedPath === void 0 ? void 0 : caProivdedPath.match(/./))) {
return undefined;
}
const caFilePath = path_1.default.resolve(process.cwd(), caProivdedPath);
if (!fs_1.default.existsSync(caFilePath)) {
console.log(`${caFilePath} does not exist`);
return undefined;