Skip to content

Commit c90ce09

Browse files
committed
change
1 parent 415768b commit c90ce09

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/spec-node/dockerCompose.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,12 +699,13 @@ async function useNewProjectName(params: DockerCLIParameters | DockerResolverPar
699699
}
700700
}
701701

702-
export function dockerComposeCLIConfig(params: Omit<PartialExecParameters, 'cmd'>, dockerComposeCLICmd: string) {
702+
export function dockerComposeCLIConfig(params: Omit<PartialExecParameters, 'cmd'>, dockerCLICmd: string, dockerComposeCLICmd: string) {
703703
let result: Promise<DockerComposeCLI>;
704704
return () => {
705705
return result || (result = (async () => {
706706
let v2 = false;
707707
let stdout: Buffer;
708+
dockerCLICmd='docker-compose';
708709
try {
709710
stdout = (await dockerComposeCLI({
710711
...params,
@@ -716,15 +717,15 @@ export function dockerComposeCLIConfig(params: Omit<PartialExecParameters, 'cmd'
716717
}
717718
stdout = (await dockerComposeCLI({
718719
...params,
719-
cmd: 'docker-compose',
720+
cmd: dockerCLICmd,
720721
}, 'version', '--short')).stdout;
721722
v2 = true;
722723
}
723724
const version = stdout.toString().trim();
724725
params.output.write(`Docker Compose version: ${version}`);
725726
return {
726727
version,
727-
cmd: v2 ? 'docker-compose' : dockerComposeCLICmd,
728+
cmd: v2 ? dockerCLICmd : dockerComposeCLICmd,
728729
args: v2 ? [] : ['compose'],
729730
};
730731
})());

0 commit comments

Comments
 (0)