Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0ce15de

Browse files
Revert "Change exec to spawn to make CodeQL happy"
This reverts commit d3aea33.
1 parent d3aea33 commit 0ce15de

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

‎test/utils.ts‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as vscode from "vscode";
66
import { ILogger } from "../src/logging";
77
import { IPowerShellExtensionClient } from "../src/features/ExternalApi";
88
import { resolveCliArgsFromVSCodeExecutablePath } from "@vscode/test-electron";
9-
import { spawnSync } from "child_process";
9+
import { execSync,spawnSync } from "child_process";
1010
import { existsSync } from "fs";
1111

1212
// This lets us test the rest of our path assumptions against the baseline of
@@ -154,17 +154,8 @@ export async function InstallCSharpExtension() {
154154
export function BuildBinaryModuleMock() {
155155
console.log("==BUILDING: Binary Module Mock==");
156156
const projectPath = path.resolve(`${__dirname}/../../test/mocks/BinaryModule/BinaryModule.csproj`); //Relative to "out/test" when testing.
157-
const dotnetArgs = [
158-
"publish",
159-
projectPath
160-
];
161-
const buildResult = spawnSync("dotnet", dotnetArgs, {
162-
encoding: "utf-8",
163-
windowsHide: true
164-
});
165-
if (buildResult.status !== 0) {
166-
throw new Error(`Failed to build binary module mock: ${buildResult.stderr}`);
167-
}
157+
const buildResult = execSync(`dotnet publish ${projectPath}`);
158+
console.log(buildResult.toString());
168159
}
169160

170161
/** Waits until the registered vscode event is fired and returns the trigger result of the event.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /