Fix workspaceRoot

This commit is contained in:
vsrs 2020-07-03 14:56:30 +03:00
parent 611fad275f
commit bebbfa1a29

View file

@ -103,6 +103,8 @@ export function prepareEnv(runnable: ra.Runnable, runnableEnvCfg: RunnableEnvCfg
env["UPDATE_EXPECT"] = "1"; env["UPDATE_EXPECT"] = "1";
} }
Object.assign(env, process.env as { [key: string]: string });
if (runnableEnvCfg) { if (runnableEnvCfg) {
if (Array.isArray(runnableEnvCfg)) { if (Array.isArray(runnableEnvCfg)) {
for (const it of runnableEnvCfg) { for (const it of runnableEnvCfg) {
@ -135,7 +137,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
type: tasks.TASK_TYPE, type: tasks.TASK_TYPE,
command: args[0], // run, test, etc... command: args[0], // run, test, etc...
args: args.slice(1), args: args.slice(1),
cwd: runnable.args.workspaceRoot, cwd: runnable.args.workspaceRoot || ".",
env: prepareEnv(runnable, config.runnableEnv), env: prepareEnv(runnable, config.runnableEnv),
}; };