From 834f8b132b43b9075c08eb6186b888f7a224168f Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Tue, 20 Oct 2015 19:02:36 -0700 Subject: [PATCH] cliconfig: Do not rely on platform dependent code The `github.com/docker/docker/pkg/system` import was only being used to call to os.MkdirAll so it seems unnecessary to pull in all of system/* when this is all that is necessary. Additionally, this was causing problems with attempting to vendor cliconfig using Godeps, as it would only vendor the necessary files based on the platform it's running on, this was seen when vendoring the package on a Mac, and then attempting to build on a Linux box due to `github.com/docker/docker/pkg/units/` not being properly included. Signed-off-by: Chance Zibolski --- cliconfig/config.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cliconfig/config.go b/cliconfig/config.go index 4e289a7d40..bdd75871a4 100644 --- a/cliconfig/config.go +++ b/cliconfig/config.go @@ -11,7 +11,6 @@ import ( "strings" "github.com/docker/docker/pkg/homedir" - "github.com/docker/docker/pkg/system" ) const ( @@ -228,7 +227,7 @@ func (configFile *ConfigFile) Save() error { return fmt.Errorf("Can't save config with empty filename") } - if err := system.MkdirAll(filepath.Dir(configFile.filename), 0700); err != nil { + if err := os.MkdirAll(filepath.Dir(configFile.filename), 0700); err != nil { return err } f, err := os.OpenFile(configFile.filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)