Merge branch 'master' into cli_colors

This commit is contained in:
bergquist
2016-03-11 14:43:12 +01:00
75 changed files with 703 additions and 585 deletions

View File

@ -29,7 +29,15 @@ func validateInput(c CommandLine, pluginFolder string) error {
}
fileInfo, err := os.Stat(pluginDir)
if err != nil && !fileInfo.IsDir() {
if err != nil {
if err = os.MkdirAll(pluginDir, os.ModePerm); err != nil {
return errors.New("path is not a directory")
}
return nil
}
if !fileInfo.IsDir() {
return errors.New("path is not a directory")
}