Initial VS Code 1.19 source merge (#571)

* Initial 1.19 xcopy

* Fix yarn build

* Fix numerous build breaks

* Next batch of build break fixes

* More build break fixes

* Runtime breaks

* Additional post merge fixes

* Fix windows setup file

* Fix test failures.

* Update license header blocks to refer to source eula
This commit is contained in:
Karl Burtram
2018-01-28 23:37:17 -08:00
committed by GitHub
parent 9a1ac20710
commit 251ae01c3e
8009 changed files with 93378 additions and 35634 deletions

View File

@@ -26,6 +26,7 @@ import extfs = require('vs/base/node/extfs');
import flow = require('vs/base/node/flow');
import { IRawFileMatch, ISerializedSearchComplete, IRawSearch, ISearchEngine, IFolderSearch } from './search';
import { spawnRipgrepCmd } from './ripgrepFileSearch';
import { rgErrorMsgForDisplay } from './ripgrepTextSearch';
enum Traversal {
Node = 1,
@@ -189,8 +190,9 @@ export class FileWalker {
rootFolderDone(undefined, undefined);
}
});
}, (err, result) => {
done(err ? err[0] : null, this.isLimitHit);
}, (errors, result) => {
const err = errors ? errors.filter(e => !!e)[0] : null;
done(err, this.isLimitHit);
});
});
}
@@ -389,13 +391,17 @@ export class FileWalker {
this.forwardData(cmd.stdout, encoding, done);
const stderr = this.collectData(cmd.stderr);
let gotData = false;
cmd.stdout.once('data', () => gotData = true);
cmd.on('error', (err: Error) => {
done(err);
});
cmd.on('close', (code: number) => {
// ripgrep returns code=1 when no results are found
if (code !== 0 && (!isRipgrep || code !== 1)) {
let stderrText, displayMsg: string;
if (isRipgrep ? (!gotData && (stderrText = this.decodeData(stderr, encoding)) && (displayMsg = rgErrorMsgForDisplay(stderrText))) : code !== 0) {
done(new Error(`command failed with error code ${code}: ${this.decodeData(stderr, encoding)}`));
} else {
if (isRipgrep && this.exists && code === 0) {
@@ -493,7 +499,7 @@ export class FileWalker {
if (self.isLimitHit) {
break;
}
};
}
}
matchDirectory(rootEntries);
}