Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCKER_OPTS is Incorrectly Parsed #769

Closed
3 of 11 tasks
Alexhuszagh opened this issue Jun 9, 2022 · 0 comments · Fixed by #771
Closed
3 of 11 tasks

DOCKER_OPTS is Incorrectly Parsed #769

Alexhuszagh opened this issue Jun 9, 2022 · 0 comments · Fixed by #771
Labels
Milestone

Comments

@Alexhuszagh
Copy link
Contributor

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

@Alexhuszagh Alexhuszagh changed the title DOCKER_OPTS DOCKER_OPTS is Incorrectly Parsed Jun 9, 2022
@Alexhuszagh Alexhuszagh added the bug label Jun 9, 2022
@Alexhuszagh Alexhuszagh added this to the v0.2.2 milestone Jun 9, 2022
Alexhuszagh added a commit to Alexhuszagh/cross that referenced this issue Jun 9, 2022
Fix parsing `DOCKER_OPTS` to correctly parse them as shell words, rather
than splitting on whitespace.

Closes cross-rs#769.
Alexhuszagh added a commit to Alexhuszagh/cross that referenced this issue Jun 9, 2022
Fix parsing `DOCKER_OPTS` to correctly parse them as shell words, rather
than splitting on whitespace.

Closes cross-rs#769.
bors bot added a commit that referenced this issue Jun 9, 2022
771: Fix parsing of docker options. r=Emilgardis a=Alexhuszagh

Fix parsing `DOCKER_OPTS` to correctly parse them as shell words, rather than splitting on whitespace.

Closes #769.

Co-authored-by: Alex Huszagh <[email protected]>
@bors bors bot closed this as completed in d5b807e Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant