Skip to content

Commit a7610da

Browse files
DrogoNevetsnodkz
authored andcommitted
fix: check for spaces and wrap in quotes
* check for spaces and wrap in quotes * eslint allow '~' * fixes bitwise * eslint runs on my machine * added double quotes back Closes #139
1 parent 09723ce commit a7610da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/util/MongoBinary.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* @flow */
22

3+
/* eslint no-bitwise: ['error', { 'allow': ['~'] }] */
4+
35
import fs from 'fs';
46
import os from 'os';
57
import path from 'path';
@@ -155,6 +157,10 @@ export default class MongoBinary {
155157
if (systemBinary) {
156158
binaryPath = await this.getSystemPath(systemBinary);
157159
if (binaryPath) {
160+
if (~binaryPath.indexOf(' ')) {
161+
binaryPath = `"${binaryPath}"`;
162+
}
163+
158164
const binaryVersion = execSync(`${binaryPath} --version`)
159165
.toString()
160166
.split('\n')[0]

0 commit comments

Comments
 (0)