) {
console.error(
chalk`{green ${Configuration.logPrefix()}} {red Deprecated configuration key '${key}' usage in section '${sectionName}'${
- logMsgToAppend.trim().length !== 0 && `. ${logMsgToAppend}`
+ logMsgToAppend.trim().length > 0 && `. ${logMsgToAppend}`
}}`
);
} else if (!Configuration.isUndefined(Configuration.getConfig()[key])) {
console.error(
chalk`{green ${Configuration.logPrefix()}} {red Deprecated configuration key '${key}' usage${
- logMsgToAppend.trim().length !== 0 && `. ${logMsgToAppend}`
+ logMsgToAppend.trim().length > 0 && `. ${logMsgToAppend}`
}}`
);
}
private static getConfigurationFileWatcher(): fs.FSWatcher | undefined {
try {
return fs.watch(Configuration.configurationFile, (event, filename): void => {
- if (filename?.trim().length !== 0 && event === 'change') {
+ if (filename?.trim().length > 0 && event === 'change') {
// Nullify to force configuration file reading
Configuration.configuration = null;
if (!Configuration.isUndefined(Configuration.configurationChangeCallback)) {
logPrefix: string,
params: HandleErrorParams<EmptyObject> = { throwError: true }
): void {
- const prefix = logPrefix?.trim().length !== 0 ? `${logPrefix} ` : '';
+ const prefix = logPrefix?.trim().length > 0 ? `${logPrefix} ` : '';
let logMsg: string;
switch (error.code) {
case 'ENOENT':