build: fix some issues on Windows platforms

Closes #9450
This commit is contained in:
Marc Laval
2016-06-21 00:25:55 +02:00
parent a5f2e205ef
commit 9decc3d823
8 changed files with 44 additions and 8 deletions

View File

@ -8,6 +8,7 @@ require('./tools/check-environment')(
const gulp = require('gulp');
const path = require('path');
const os = require('os');
const srcsToFmt = ['tools/**/*.ts', 'modules/@angular/**/*.ts'];
@ -61,7 +62,8 @@ function tsc(projectPath, done) {
child_process
.spawn(
`${__dirname}/node_modules/.bin/tsc`, ['-p', path.join(__dirname, projectPath)],
path.normalize(`${__dirname}/node_modules/.bin/tsc`) + (/^win/.test(os.platform()) ? '.cmd' : ''),
['-p', path.join(__dirname, projectPath)],
{stdio: 'inherit'})
.on('close', (errorCode) => done(errorCode));
}