mirror of https://github.com/docker/cli.git
d6dd08d568
When deploying a stack using a relative path as bind-mount
source in the compose file, the CLI converts the relative
path to an absolute path, relative to the location of the
docker-compose file.
This causes a problem when deploying a stack that uses
an absolute Windows path, because a non-Windows client will
fail to detect that the path (e.g. `C:\somedir`) is an absolute
path (and not a relative directory named `C:\`).
The existing code did already take Windows clients deploying
a Linux stack into account (by checking if the path had a leading
slash). This patch adds the reverse, and adds detection for Windows
absolute paths on non-Windows clients.
The code used to detect Windows absolute paths is copied from the
Golang filepath package;
|
||
---|---|---|
.. | ||
example1.env | ||
example2.env | ||
full-example.yml | ||
full-struct_test.go | ||
interpolate.go | ||
loader.go | ||
loader_test.go | ||
merge.go | ||
merge_test.go | ||
types_test.go | ||
volume.go | ||
volume_test.go | ||
windows_path.go | ||
windows_path_test.go |