Skip to content

Commit

Permalink
chore: add shell flag to prepare script (#2646)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken authored Dec 1, 2020
1 parent 43c94b6 commit 98ae02c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion etc/prepare.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#! /usr/bin/env node
var cp = require('child_process');
var fs = require('fs');
var os = require('os');

if (fs.existsSync('src')) {
cp.spawn('npm', ['run', 'build:dts'], { stdio: 'inherit' });
cp.spawn('npm', ['run', 'build:dts'], { stdio: 'inherit', shell: os.platform() === 'win32' });
} else {
if (!fs.existsSync('lib')) {
console.warn('MongoDB: No compiled javascript present, the driver is not installed correctly.');
Expand Down

0 comments on commit 98ae02c

Please sign in to comment.