1
0
Fork 0

set env variables for Util.exec

refactor/models
Matthew 2019-12-30 17:58:39 -05:00
parent 49f8d48cfd
commit d464d3fa1c
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 1 additions and 1 deletions

View File

@ -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}`));