mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
The issue comes from the implementation of volumeSplitN() where a driver letter (`[a-zA-Z]:`) was assumed to follow either `:`, `/`, or `\\`. In Windows driver letter appears in two situations: a. `^[a-zA-Z]:` (A colon followed by `^[a-zA-Z]:` is OK as colon is the separator in volume option) b. A string in the format like `\\?\C:\Windows\...` (UNC). Therefore, a driver letter can only follow either a `:` or `\\` This PR removes the condition of `/` before the driver letter so that options like `-v /tmp/q:/foo` could be handled correctly. A couple of tests has also been added. This PR fixes #20122. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: 800a7d513d3b80478a7996cb2c357b72f65e0b09 Component: engine