Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit acec5cf

Browse files
committed
Fix workspaceRoot
1 parent b919dfc commit acec5cf

File tree

1 file changed

+3
-1
lines changed
  • rust-analyzer/editors/code/src

1 file changed

+3
-1
lines changed

rust-analyzer/editors/code/src/run.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ export function prepareEnv(runnable: ra.Runnable, runnableEnvCfg: RunnableEnvCfg
103103
env["UPDATE_EXPECT"] = "1";
104104
}
105105

106+
Object.assign(env, process.env as { [key: string]: string });
107+
106108
if (runnableEnvCfg) {
107109
if (Array.isArray(runnableEnvCfg)) {
108110
for (const it of runnableEnvCfg) {
@@ -135,7 +137,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
135137
type: tasks.TASK_TYPE,
136138
command: args[0], // run, test, etc...
137139
args: args.slice(1),
138-
cwd: runnable.args.workspaceRoot,
140+
cwd: runnable.args.workspaceRoot || ".",
139141
env: prepareEnv(runnable, config.runnableEnv),
140142
};
141143

0 commit comments

Comments
 (0)