File tree 1 file changed +3
-12
lines changed
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import * as vscode from "vscode";
6
6
import { ILogger } from "../src/logging" ;
7
7
import { IPowerShellExtensionClient } from "../src/features/ExternalApi" ;
8
8
import { resolveCliArgsFromVSCodeExecutablePath } from "@vscode/test-electron" ;
9
- import { spawnSync } from "child_process" ;
9
+ import { execSync , spawnSync } from "child_process" ;
10
10
import { existsSync } from "fs" ;
11
11
12
12
// This lets us test the rest of our path assumptions against the baseline of
@@ -154,17 +154,8 @@ export async function InstallCSharpExtension() {
154
154
export function BuildBinaryModuleMock ( ) {
155
155
console . log ( "==BUILDING: Binary Module Mock==" ) ;
156
156
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 ( ) ) ;
168
159
}
169
160
170
161
/** 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