Skip to content

Commit

Permalink
feat: Add execPath option to set path to docker-compose executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrono authored and AlexZeitler committed May 8, 2021
1 parent 876a032 commit 58f09f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
})
Expand Down

0 comments on commit 58f09f4

Please sign in to comment.