mirror of
https://github.com/danbulant/docker-compose
synced 2026-06-24 09:22:08 +00:00
feat: Add execPath option to set path to docker-compose executable
This commit is contained in:
parent
876a032001
commit
58f09f4c74
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue