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 <chance@coreos.com>
This commit is contained in:
Chance Zibolski 2015-10-20 19:02:36 -07:00 committed by Chance Zibolski
parent 967e49bdbc
commit 834f8b132b

View file

@ -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)