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

Adjust absolute paths on Windows for Docker #30

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

acornmakes
Copy link

The Windows Docker CLI has very specific requirements for absolute paths on Windows. The tool accepts absolute path formats such as /c/path/to/dest.

The Rust canonicalize function creates a UNC path which the Docker CLI command does not accept.

This PR addresses the issue #28 by adding a new function with a custom block of Windows only code (using cfg! macro) to reformat the path to a Docker CLI compatible path string. On other OSes, the string is returned as it was before, unchanged.

@rattling
Copy link

Tested this PR successfully.
I pulled this branch, created the exe on windows and it fixed the problem.
Thanks a mill!

@tylerxprice
Copy link

Built and tested locally on a Windows 10 host and rails-new was successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants