MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / checkBinaryPathExists

Function checkBinaryPathExists

web/pgadmin/static/js/utils.js:327–345  ·  view source on GitHub ↗
(binaryPathArray, selectedServerVersion)

Source from the content-addressed store, hash-verified

325}
326
327function checkBinaryPathExists(binaryPathArray, selectedServerVersion) {
328 let foundDefaultPath = false,
329 serverSpecificPathExist = false,
330 binPathArray = JSON.parse(binaryPathArray);
331
332 _.each(binPathArray, function(binPath) {
333 if (selectedServerVersion >= binPath.version && selectedServerVersion < binPath.next_major_version) {
334 if (!_.isUndefined(binPath.binaryPath) && !_.isNull(binPath.binaryPath) && binPath.binaryPath.trim() !== '')
335 serverSpecificPathExist = true;
336 }
337
338 // Check for default path
339 if (binPath.isDefault) {
340 foundDefaultPath = true;
341 }
342 });
343
344 return (serverSpecificPathExist | foundDefaultPath);
345}
346
347/* If a function, then evaluate */
348export function evalFunc(obj, func, ...param) {

Callers 1

hasBinariesConfigurationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected