feat: Add execPath option to set path to docker-compose executable

This commit is contained in:
Michael James 2021-05-06 22:10:24 -06:00 committed by Alexander Zeitler
parent 876a032001
commit 58f09f4c74

View file

@ -2,6 +2,7 @@ import childProcess from 'child_process'
import yaml from 'yaml' import yaml from 'yaml'
export interface IDockerComposeOptions { export interface IDockerComposeOptions {
cwd?: string cwd?: string
execPath?: string
config?: string | string[] config?: string | string[]
configAsString?: string configAsString?: string
log?: boolean log?: boolean
@ -186,8 +187,9 @@ const execCompose = (
const cwd = options.cwd const cwd = options.cwd
const env = options.env || undefined 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, cwd,
env env
}) })