jww.INFO.Println("creating theme at", createpath)
if x, _ := helpers.Exists(createpath, hugofs.SourceFs); x {
- jww.FATAL.Fatalln(createpath, "already exists")
+ return newUserError(createpath, "already exists")
}
mkdir(createpath, "layouts", "_default")
err := helpers.WriteToDisk(filepath.Join(createpath, "archetypes", "default.md"), bytes.NewReader(archDefault), hugofs.SourceFs)
if err != nil {
-
- jww.FATAL.Fatalln(err)
+ return err
}
mkdir(createpath, "static", "js")
err = helpers.WriteToDisk(filepath.Join(createpath, "LICENSE.md"), bytes.NewReader(by), hugofs.SourceFs)
if err != nil {
- return nil
+ return err
}
createThemeMD(createpath)