aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/cli/cli-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/cli/cli-command.ts')
-rw-r--r--shared/extra-utils/cli/cli-command.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/shared/extra-utils/cli/cli-command.ts b/shared/extra-utils/cli/cli-command.ts
index bc1dddc68..ab9738174 100644
--- a/shared/extra-utils/cli/cli-command.ts
+++ b/shared/extra-utils/cli/cli-command.ts
@@ -17,7 +17,11 @@ export class CLICommand extends AbstractCommand {
17 return `NODE_ENV=test NODE_APP_INSTANCE=${this.server.internalServerNumber}` 17 return `NODE_ENV=test NODE_APP_INSTANCE=${this.server.internalServerNumber}`
18 } 18 }
19 19
20 async execWithEnv (command: string) { 20 async execWithEnv (command: string, configOverride?: any) {
21 return CLICommand.exec(`${this.getEnv()} ${command}`) 21 const prefix = configOverride
22 ? `NODE_CONFIG='${JSON.stringify(configOverride)}'`
23 : ''
24
25 return CLICommand.exec(`${prefix} ${this.getEnv()} ${command}`)
22 } 26 }
23} 27}