mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
fix: built-in dev mongo can't start on win32 when username has spaces
This commit is contained in:
@@ -28,6 +28,17 @@ function spawnMongod(mongodPath, port, dbPath, replSetName) {
|
||||
mongodPath = files.convertToOSPath(mongodPath);
|
||||
dbPath = files.convertToOSPath(dbPath);
|
||||
|
||||
// Because we're spawning the process with shell: true on win32, the
|
||||
// command string and args array are effectively concatenated to
|
||||
// a single string and passed into the shell. If any of those paths
|
||||
// contain spaces, these will get broken up on white-spaces and treated
|
||||
// as separate tokens. If they are quoted, they will be parsed
|
||||
// correctly by the shell.
|
||||
if (process.platform === 'win32') {
|
||||
mongodPath = '"' + mongodPath + '"'
|
||||
dbPath = '"' + dbPath + '"'
|
||||
}
|
||||
|
||||
let args = [
|
||||
// nb: cli-test.sh and findMongoPids make strong assumptions about the
|
||||
// order of the arguments! Check them before changing any arguments.
|
||||
|
||||
Reference in New Issue
Block a user