File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import * as vscode from "vscode";
66import { ILogger } from "../src/logging" ;
77import { IPowerShellExtensionClient } from "../src/features/ExternalApi" ;
88import { resolveCliArgsFromVSCodeExecutablePath } from "@vscode/test-electron" ;
9- import { execSync , spawnSync } from "child_process" ;
9+ import { spawnSync } from "child_process" ;
1010import { existsSync } from "fs" ;
1111
1212// This lets us test the rest of our path assumptions against the baseline of
@@ -154,8 +154,17 @@ export async function InstallCSharpExtension() {
154154export 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 buildResult = execSync ( `dotnet publish ${ projectPath } ` ) ;
158- console . log ( buildResult . toString ( ) ) ;
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+ }
159168}
160169
161170/** Waits until the registered vscode event is fired and returns the trigger result of the event.
You can’t perform that action at this time.
0 commit comments