From 698ea75c66b801102c531470f5cc4f57ebae183e Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Mon, 7 May 2018 15:35:20 +0200 Subject: [PATCH] Use filepath.Base instead of path.Base This ensures Windows paths are handled correctly as explained in the path package documentation. Signed-off-by: Mathieu Champlon --- cli/command/stack/kubernetes/stack.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/command/stack/kubernetes/stack.go b/cli/command/stack/kubernetes/stack.go index 76cf07aa20..847c7e7a63 100644 --- a/cli/command/stack/kubernetes/stack.go +++ b/cli/command/stack/kubernetes/stack.go @@ -2,7 +2,7 @@ package kubernetes import ( "io/ioutil" - "path" + "path/filepath" "sort" "github.com/docker/cli/kubernetes/compose/v1beta2" @@ -36,7 +36,7 @@ func (s *stack) createFileBasedConfigMaps(configMaps corev1.ConfigMapInterface) continue } - fileName := path.Base(config.File) + fileName := filepath.Base(config.File) content, err := ioutil.ReadFile(config.File) if err != nil { return err @@ -76,7 +76,7 @@ func (s *stack) createFileBasedSecrets(secrets corev1.SecretInterface) error { continue } - fileName := path.Base(secret.File) + fileName := filepath.Base(secret.File) content, err := ioutil.ReadFile(secret.File) if err != nil { return err