Skip to content

Commit

Permalink
- adds the environment variable passing to the json RPC server
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Apr 26, 2024
1 parent d440b29 commit 807fc00
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vscode/microsoft-kiota/src/kiotaInterop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ export async function connectToKiota<T>(context: vscode.ExtensionContext, callba
const kiotaPath = getKiotaPath(context);
await ensureKiotaIsPresent(context);
const childProcess = cp.spawn(kiotaPath, ["rpc"],{
cwd: vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0 ? vscode.workspace.workspaceFolders[0].uri.fsPath : undefined
cwd: vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0 ? vscode.workspace.workspaceFolders[0].uri.fsPath : undefined,
env: {
...process.env,
// eslint-disable-next-line @typescript-eslint/naming-convention
KIOTA_CONFIG_PREVIEW: "true",
}
});
let connection = rpc.createMessageConnection(
new rpc.StreamMessageReader(childProcess.stdout),
Expand Down

0 comments on commit 807fc00

Please sign in to comment.