From d464d3fa1c1d4b32544626b6a811ed317dda0e8c Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 30 Dec 2019 17:58:39 -0500 Subject: [PATCH] set env variables for Util.exec --- src/class/Util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index c51c484..282e209 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -29,7 +29,7 @@ export default class Util { let result: string; // eslint-disable-next-line no-useless-catch try { - const res = await ex(command); + const res = await ex(command, { env: { HOME: '/root' } }); result = res.stderr || res.stdout; } catch (err) { return Promise.reject(new Error(`Command failed: ${err.cmd}\n${err.stderr || err.stdout}`));