Skip to content

DOCKER_OPTS is Incorrectly Parsed #769

@Alexhuszagh

Description

@Alexhuszagh

Checklist

Describe your issue

DOCKER_OPTS isn't parsed correctly, splitting on white-space which causes issues in some cases.

What target(s) are you cross-compiling for?

other (specify in description)

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.1 (ee2fc1b 2022-06-08)

Example

Running the following command will produce docker options such as the following:

Command

DOCKER_OPTS='-v "/mnt/c/Program Files/Git":/git' CROSS_CONTAINER_ENGINE=podman \
    cross build --target mips64-unknown-linux-gnuabi64 --verbose

Parsed

["-v", "\"/mnt/c/Program", "Files/Git\":/git"]

Likewise, explicitly setting DOCKER_OPTS to an empty string (a valid option) gives us the following, which is invalid:

[""]

Additional information / notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions