Skip to content

upMany commandOption Issue #300

Description

@m-a-b-r-a

version: "1.2.0"

the code

const result = await compose.upMany(services, {
        cwd: '/dir/myapp',
        commandOptions: ['--no-deps', '--build'],
        log: false,
        callback: (chunk, stream) => {
          const text = chunk.toString('utf8');
          if (stream === 'stderr') {
            LoggerService.log(`[DOCKER ERROR] ${text}`);
          } else {
            LoggerService.log(`[DOCKER LOG] ${text}`);
          }
        },
      });

GOT error

[DOCKER ERROR] unknown flag: --no-deps
See 'docker --help'.
Usage:  docker [OPTIONS] COMMAND

I believe in some cases, the command options are being inserted before the compose subcommand, like this:

docker [commandOptions] compose up

As a result, Docker cannot recognize these flags because they are not valid for the main docker CLI, only for docker compose.

Please verify how the command is being constructed, especially in the handling of commandOptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions