buildkite-plugins / docker-buildkite-plugin

🐳📦 Run any build step in a Docker container
MIT License
113 stars 106 forks source link

expand_relative_volume_path: Doesn't expand all relative volumes #150

Closed abraithwaite closed 2 years ago

abraithwaite commented 5 years ago

expand_relative_volume_path: Doesn't expand all relative volumes. When putting in .cache:/path/inside/container it doesn't expand to the expected $PWD/.cache.

I"m not so good at reading bash or regexes, but it doesn't seem to expand the way I'd expect for directories that don't start with ./.

https://github.com/buildkite-plugins/docker-buildkite-plugin/blob/0be3ac836c694ff61b031ee08c84d4340133fdd4/hooks/command#L49-L59

I think it's safe to assume that if the path doesn't start with / (or w/e the equivalent in windows is), then it's a relative path no?