Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit d639bcd

Browse files
David ScheinerLoneRifle
David Scheiner
authored andcommitted
De-lint
1 parent d0bd8c9 commit d639bcd

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

src/mongo-bins.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ export class MongoBins {
4343
this.debug(`run() Supervise process didn't start: ${e}`);
4444
});
4545
resolve(true);
46-
}, (e)=> {
46+
}, (e) => {
4747
this.debug(`error executing command ${e}`);
4848
reject(e);
4949
});
5050
});
5151
}
52-
53-
runCommand(): Promise<boolean> {
52+
53+
runCommand(): Promise<boolean> {
5454
return new Promise<boolean>((resolve, reject) => {
5555
let getCommandPromise: Promise<string> = this.getCommand();
5656
let getCommandArgumentsPromise: Promise<string[]> = this.getCommandArguments();
57-
57+
5858
Promise.all([
5959
getCommandPromise,
6060
getCommandArgumentsPromise
@@ -70,11 +70,11 @@ export class MongoBins {
7070

7171
});
7272
}
73-
73+
7474
getCommand(): Promise<string> {
7575
return new Promise<string>((resolve, reject) => {
7676
this.mongoDBPrebuilt.getBinPath().then(binPath => {
77-
let command: string= resolvePath(binPath, this.command);
77+
let command: string = resolvePath(binPath, this.command);
7878
this.debug(`getCommand(): ${command}`);
7979
resolve(command);
8080
});

src/mongod-helper.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class MongodHelper {
4747
stderrHandler(message: string | Buffer): void {
4848
this.debug(`mongod stderr: ${message}`);
4949
}
50-
50+
5151
stdoutHandler(message: string | Buffer): void {
5252
this.debug(`mongod stdout: ${message}`);
5353
let log: string = message.toString();
@@ -57,28 +57,28 @@ export class MongodHelper {
5757
let mongodPermissionDeniedExpression: RegExp = this.getMongodPermissionDeniedExpression();
5858
let mongodDataDirNotFounddExpression: RegExp = this.getMongodDataDirNotFounddExpression();
5959
let mongodShutdownMessageExpression: RegExp = this.getMongodShutdownMessageExpression();
60-
61-
if ( mongodStartExpression.test(log) ) {
60+
61+
if (mongodStartExpression.test(log)) {
6262
this.resolveLink(true);
6363
}
6464

65-
if ( mongodAlreadyRunningExpression.test(log) ) {
65+
if (mongodAlreadyRunningExpression.test(log)) {
6666
return this.rejectLink('already running');
6767
}
6868

69-
if ( mongodAlreadyRunningExpression.test(log) ) {
69+
if (mongodAlreadyRunningExpression.test(log)) {
7070
return this.rejectLink('already running');
7171
}
7272

73-
if ( mongodPermissionDeniedExpression.test(log) ) {
73+
if (mongodPermissionDeniedExpression.test(log)) {
7474
return this.rejectLink('permission denied');
7575
}
7676

77-
if ( mongodDataDirNotFounddExpression.test(log) ) {
77+
if (mongodDataDirNotFounddExpression.test(log)) {
7878
return this.rejectLink('Data directory not found');
7979
}
8080

81-
if ( mongodShutdownMessageExpression.test(log) ) {
81+
if (mongodShutdownMessageExpression.test(log)) {
8282
return this.rejectLink('Mongod shutting down');
8383
}
8484

src/mongodb-prebuilt.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class MongoDBPrebuilt {
4343
})
4444
});
4545
}
46-
46+
4747
private resolveBinPath(extractLocation: string): Promise<string> {
4848
return new Promise<string>((resolve, reject) => {
4949
let binPath: string = `${extractLocation}/*/bin`;
@@ -52,7 +52,7 @@ export class MongoDBPrebuilt {
5252
this.debug(`resolveBinPath() error ${err}`);
5353
reject(err);
5454
} else {
55-
if ( this.hasValidBinPath(files) === true ) {
55+
if (this.hasValidBinPath(files) === true) {
5656
let resolvedBinPath: string = files[0];
5757
this.debug(`resolveBinPath(): ${resolvedBinPath}`);
5858
resolve(resolvedBinPath);
@@ -63,18 +63,18 @@ export class MongoDBPrebuilt {
6363
});
6464
});
6565
}
66-
66+
6767
private hasValidBinPath(files: string[]): boolean {
68-
if ( files.length === 1 ) {
68+
if (files.length === 1) {
6969
return true;
70-
} else if ( files.length > 1 ) {
70+
} else if (files.length > 1) {
7171
this.debug(`getBinPath() directory corrupted, only one installation per hash can exist`);
7272
return false
7373
} else {
7474
this.debug(`getBinPath() doesn't exist, files: ${files}`);
7575
return false;
76-
}
76+
}
7777
}
78-
78+
7979
}
8080

0 commit comments

Comments
 (0)