mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
lint: AbsolutePaths.js
This commit is contained in:
parent
b1614f0592
commit
5718c8b360
1 changed files with 9 additions and 5 deletions
|
@ -43,8 +43,9 @@ let etherpadRoot = null;
|
|||
*/
|
||||
const popIfEndsWith = (stringArray, lastDesiredElements) => {
|
||||
if (stringArray.length <= lastDesiredElements.length) {
|
||||
absPathLogger.debug(`In order to pop "${lastDesiredElements.join(path.sep)}" from "${stringArray.join(path.sep)}", it should contain at least ${lastDesiredElements.length + 1} elements`);
|
||||
|
||||
absPathLogger.debug(`In order to pop "${lastDesiredElements.join(path.sep)}" ` +
|
||||
`from "${stringArray.join(path.sep)}", it should contain at least ` +
|
||||
`${lastDesiredElements.length + 1} elements`);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -54,7 +55,8 @@ const popIfEndsWith = (stringArray, lastDesiredElements) => {
|
|||
return _.initial(stringArray, lastDesiredElements.length);
|
||||
}
|
||||
|
||||
absPathLogger.debug(`${stringArray.join(path.sep)} does not end with "${lastDesiredElements.join(path.sep)}"`);
|
||||
absPathLogger.debug(
|
||||
`${stringArray.join(path.sep)} does not end with "${lastDesiredElements.join(path.sep)}"`);
|
||||
return false;
|
||||
};
|
||||
|
||||
|
@ -102,7 +104,8 @@ exports.findEtherpadRoot = () => {
|
|||
}
|
||||
|
||||
if (maybeEtherpadRoot === false) {
|
||||
absPathLogger.error(`Could not identity Etherpad base path in this ${process.platform} installation in "${foundRoot}"`);
|
||||
absPathLogger.error('Could not identity Etherpad base path in this ' +
|
||||
`${process.platform} installation in "${foundRoot}"`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
@ -113,7 +116,8 @@ exports.findEtherpadRoot = () => {
|
|||
return etherpadRoot;
|
||||
}
|
||||
|
||||
absPathLogger.error(`To run, Etherpad has to identify an absolute base path. This is not: "${etherpadRoot}"`);
|
||||
absPathLogger.error(
|
||||
`To run, Etherpad has to identify an absolute base path. This is not: "${etherpadRoot}"`);
|
||||
process.exit(1);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue