From 58f09f4c7414df5a6ee7af7f77d2af297d84d6c1 Mon Sep 17 00:00:00 2001 From: Michael James Date: Thu, 6 May 2021 22:10:24 -0600 Subject: [PATCH] feat: Add execPath option to set path to docker-compose executable --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 91cb683..3232517 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ import childProcess from 'child_process' import yaml from 'yaml' export interface IDockerComposeOptions { cwd?: string + execPath?: string config?: string | string[] configAsString?: string log?: boolean @@ -186,8 +187,9 @@ const execCompose = ( const cwd = options.cwd const env = options.env || undefined + const execPath = options.execPath || 'docker-compose' - const childProc = childProcess.spawn('docker-compose', composeArgs, { + const childProc = childProcess.spawn(execPath, composeArgs, { cwd, env })