diff --git a/src/config-inferrer.ts b/src/config-inferrer.ts index 689dd35..cd85a93 100644 --- a/src/config-inferrer.ts +++ b/src/config-inferrer.ts @@ -11,12 +11,13 @@ export class ConfigInferrer { protected contributions: ((ctx: Context) => Promise)[] = [ this.checkNode.bind(this), this.checkJava.bind(this), + this.checkMake.bind(this), this.checkPython.bind(this), this.checkGo.bind(this), this.checkRust.bind(this), - this.checkMake.bind(this), this.checkNuget.bind(this), this.checkRuby.bind(this), + this.checkDockerCompose.bind(this), ] async getConfig(ctx: Context): Promise { @@ -146,6 +147,12 @@ export class ConfigInferrer { } } + protected async checkDockerCompose(ctx: Context) { + if (await ctx.exists('docker-compose.yml')) { + this.addCommand(ctx.config, 'docker-compose up', 'command'); + } + } + protected addCommand(config: WorkspaceConfig, command: string, phase: 'before' | 'init' | 'command', unless?: string): void { if (!config.tasks) { config.tasks = [];