Skip to content

Commit fe8ba34

Browse files
nikselitegrgur
authored andcommittedMar 8, 2017
Fix cmd command for Windows (#17)
In Windows string './node_modules/.bin/' must be enclosed in double quotes, as it contains character '.' (dot). Otherwise, you will get the error: '.' is not recognized as an internal or external command, operable program or batch file.
1 parent 73b5553 commit fe8ba34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
var exec = require('child_process').exec;
33

44
var executable = (!process.argv[3].indexOf('server')) ? 'webpack-dev-server' : 'webpack';
5-
var cmdLine = './node_modules/.bin/' + executable;
5+
var cmdLine = '"./node_modules/.bin/' + executable + '"';
66
var environ = (!process.argv[2].indexOf('development')) ? 'development' : 'production';
77
var command;
88

99
if (process.platform === 'win32') {
10-
cmdLine = 'set NODE_ENV=' + environ + '&& ' + cmdLine;
10+
cmdLine = 'set NODE_ENV=' + environ + ' && ' + cmdLine;
1111
} else {
1212
cmdLine = 'NODE_ENV=' + environ + ' ' + cmdLine;
1313
}

0 commit comments

Comments
 (0)
Please sign in to comment.