mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
build: replace uses of archive.CanonicalTarNameForPath
This function is an alias for filepath.IsAbs and we are considering deprecating
and/or removing this function in the archive package, so removing its uses
helps transitioning if we decide to deprecate and/or remove it.
[docker/cli@fb0788f] also added a normalize step in TrimBuildFilesFromExcludes,
so that callers are not _required_ to first normalize the path, so the
normalizeation may be redunant, but keeping the normalization as this variable
is used further down the code.
[docker/cli@fb0788f]: fb0788f18f
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
1a14fcb1e6
commit
5ec37d08a5
@ -124,7 +124,7 @@ func (s *composeService) doBuildClassic(ctx context.Context, project *types.Proj
|
||||
}
|
||||
|
||||
// And canonicalize dockerfile name to a platform-independent one
|
||||
relDockerfile = archive.CanonicalTarNameForPath(relDockerfile)
|
||||
relDockerfile = filepath.ToSlash(relDockerfile)
|
||||
|
||||
excludes = build.TrimBuildFilesFromExcludes(excludes, relDockerfile, false)
|
||||
buildCtx, err = archive.TarWithOptions(contextDir, &archive.TarOptions{
|
||||
|
Loading…
x
Reference in New Issue
Block a user