Skip to content

Commit 9449a2e

Browse files
authored
Fix args passed to spawnAsync in installNewPtvsd (#8871)
1 parent 411f955 commit 9449a2e

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

gulpfile.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const os = require('os');
3232

3333
const isCI = process.env.TRAVIS === 'true' || process.env.TF_BUILD !== undefined;
3434

35-
const noop = function() {};
35+
const noop = function () { };
3636
/**
3737
* Hygiene works by creating cascading subsets of all our files and
3838
* passing them through a sequence of checks. Here are the current subsets,
@@ -72,7 +72,7 @@ gulp.task('compile', done => {
7272
.on('error', () => (failed = true))
7373
.js.pipe(gulp.dest('out'))
7474
.on('finish', () => (failed ? done(new Error('TypeScript compilation errors')) : done()));
75-
});
75+
});
7676

7777
gulp.task('precommit', done => run({ exitOnError: true, mode: 'staged' }, done));
7878

@@ -261,7 +261,7 @@ gulp.task('installPythonRequirements', async () => {
261261
// See https://github.com/microsoft/vscode-python/issues/7136
262262
gulp.task('installNewPtvsd', async () => {
263263
// Install new PTVSD with wheels for python 3.7
264-
const successWithWheels = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', './pythonFiles/install_ptvsd.py')
264+
const successWithWheels = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', ['./pythonFiles/install_ptvsd.py'])
265265
.then(() => true)
266266
.catch(ex => {
267267
console.error("Failed to install new PTVSD wheels using 'python3'", ex);
@@ -491,7 +491,7 @@ const hygiene = (options, done) => {
491491
options = options || {};
492492
let errorCount = 0;
493493

494-
const indentation = es.through(function(file) {
494+
const indentation = es.through(function (file) {
495495
file.contents
496496
.toString('utf8')
497497
.split(/\r\n|\r|\n/)
@@ -510,7 +510,7 @@ const hygiene = (options, done) => {
510510
});
511511

512512
const formatOptions = { verify: true, tsconfig: true, tslint: true, editorconfig: true, tsfmt: true };
513-
const formatting = es.map(function(file, cb) {
513+
const formatting = es.map(function (file, cb) {
514514
tsfmt
515515
.processString(file.path, file.contents.toString('utf8'), formatOptions)
516516
.then(result => {
@@ -568,15 +568,15 @@ const hygiene = (options, done) => {
568568
}
569569

570570
const { linter, configuration } = getLinter(options);
571-
const tsl = es.through(function(file) {
571+
const tsl = es.through(function (file) {
572572
const contents = file.contents.toString('utf8');
573573
if (isCI) {
574574
// Don't print anything to the console, we'll do that.
575575
console.log('.');
576576
}
577577
// Yes this is a hack, but tslinter doesn't provide an option to prevent this.
578578
const oldWarn = console.warn;
579-
console.warn = () => {};
579+
console.warn = () => { };
580580
linter.failures = [];
581581
linter.fixes = [];
582582
linter.lint(file.relative, contents, configuration.results);
@@ -595,18 +595,18 @@ const hygiene = (options, done) => {
595595
});
596596

597597
const tsFiles = [];
598-
const tscFilesTracker = es.through(function(file) {
598+
const tscFilesTracker = es.through(function (file) {
599599
tsFiles.push(file.path.replace(/\\/g, '/'));
600600
tsFiles.push(file.path);
601601
this.emit('data', file);
602602
});
603603

604604
const tsProject = getTsProject(options);
605605

606-
const tsc = function() {
606+
const tsc = function () {
607607
function customReporter() {
608608
return {
609-
error: function(error, typescript) {
609+
error: function (error, typescript) {
610610
const fullFilename = error.fullFilename || '';
611611
const relativeFilename = error.relativeFilename || '';
612612
if (tsFiles.findIndex(file => fullFilename === file || relativeFilename === file) === -1) {
@@ -615,7 +615,7 @@ const hygiene = (options, done) => {
615615
console.error(`Error: ${error.message}`);
616616
errorCount += 1;
617617
},
618-
finish: function() {
618+
finish: function () {
619619
// forget the summary.
620620
console.log('Finished compilation');
621621
}
@@ -649,7 +649,7 @@ const hygiene = (options, done) => {
649649
.pipe(sourcemaps.init())
650650
.pipe(tsc())
651651
.pipe(
652-
sourcemaps.mapSources(function(sourcePath, file) {
652+
sourcemaps.mapSources(function (sourcePath, file) {
653653
let tsFileName = path.basename(file.path).replace(/js$/, 'ts');
654654
const qualifiedSourcePath = path
655655
.dirname(file.path)
@@ -669,7 +669,7 @@ const hygiene = (options, done) => {
669669
.pipe(sourcemaps.write('.', { includeContent: false }))
670670
.pipe(gulp.dest(dest))
671671
.pipe(
672-
es.through(null, function() {
672+
es.through(null, function () {
673673
if (errorCount > 0) {
674674
const errorMessage = `Hygiene failed with errors 👎 . Check 'gulpfile.js' (completed in ${new Date().getTime() - started}ms).`;
675675
console.error(colors.red(errorMessage));
@@ -879,5 +879,5 @@ exports.hygiene = hygiene;
879879

880880
// this allows us to run hygiene via CLI (e.g. `node gulfile.js`).
881881
if (require.main === module) {
882-
run({ exitOnError: true, mode: 'staged' }, () => {});
882+
run({ exitOnError: true, mode: 'staged' }, () => { });
883883
}

0 commit comments

Comments
 (0)