mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Merge pull request #29816 from Microsoft/ti
Use execFileSync in typing installer
This commit is contained in:
@@ -1684,9 +1684,9 @@ namespace ts.projectSystem {
|
||||
TI.getNpmCommandForInstallation(npmPath, tsVersion, packageNames, packageNames.length - Math.ceil(packageNames.length / 2)).command
|
||||
];
|
||||
it("works when the command is too long to install all packages at once", () => {
|
||||
const commands: string[] = [];
|
||||
const hasError = TI.installNpmPackages(npmPath, tsVersion, packageNames, command => {
|
||||
commands.push(command);
|
||||
const commands: [string, string[]][] = [];
|
||||
const hasError = TI.installNpmPackages(npmPath, tsVersion, packageNames, (file, args) => {
|
||||
commands.push([file, args]);
|
||||
return false;
|
||||
});
|
||||
assert.isFalse(hasError);
|
||||
@@ -1694,9 +1694,9 @@ namespace ts.projectSystem {
|
||||
});
|
||||
|
||||
it("installs remaining packages when one of the partial command fails", () => {
|
||||
const commands: string[] = [];
|
||||
const hasError = TI.installNpmPackages(npmPath, tsVersion, packageNames, command => {
|
||||
commands.push(command);
|
||||
const commands: [string, string[]][] = [];
|
||||
const hasError = TI.installNpmPackages(npmPath, tsVersion, packageNames, (file, args) => {
|
||||
commands.push([file, args]);
|
||||
return commands.length === 1;
|
||||
});
|
||||
assert.isTrue(hasError);
|
||||
|
||||
Reference in New Issue
Block a user