mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
Fix workspaceRoot
This commit is contained in:
parent
611fad275f
commit
bebbfa1a29
1 changed files with 3 additions and 1 deletions
|
@ -103,6 +103,8 @@ export function prepareEnv(runnable: ra.Runnable, runnableEnvCfg: RunnableEnvCfg
|
|||
env["UPDATE_EXPECT"] = "1";
|
||||
}
|
||||
|
||||
Object.assign(env, process.env as { [key: string]: string });
|
||||
|
||||
if (runnableEnvCfg) {
|
||||
if (Array.isArray(runnableEnvCfg)) {
|
||||
for (const it of runnableEnvCfg) {
|
||||
|
@ -135,7 +137,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
type: tasks.TASK_TYPE,
|
||||
command: args[0], // run, test, etc...
|
||||
args: args.slice(1),
|
||||
cwd: runnable.args.workspaceRoot,
|
||||
cwd: runnable.args.workspaceRoot || ".",
|
||||
env: prepareEnv(runnable, config.runnableEnv),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue