diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | cmd/ponzu/main.go | 2 | ||||
-rw-r--r-- | cmd/ponzu/options.go | 25 |
3 files changed, 17 insertions, 12 deletions
@@ -8,7 +8,7 @@ $ go get github.com/ponzu-cms/ponzu/... ## Usage ``` -$ ponzu [specifiers] command <params> +$ ponzu [flags] command <params> Ponzu is a powerful and efficient open-source "Content-as-a-Service" system framework. It provides automatic, free, and secure HTTP/2 over TLS (certificates diff --git a/cmd/ponzu/main.go b/cmd/ponzu/main.go index ae646c5..13c4edd 100644 --- a/cmd/ponzu/main.go +++ b/cmd/ponzu/main.go @@ -23,7 +23,7 @@ import ( var year = fmt.Sprintf("%d", time.Now().Year()) var usageHeader = ` -$ ponzu [specifiers] command <params> +$ ponzu [flags] command <params> Ponzu is a powerful and efficient open-source "Content-as-a-Service" system framework. It provides automatic, free, and secure HTTP/2 over TLS (certificates diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go index e1e432f..bb105ce 100644 --- a/cmd/ponzu/options.go +++ b/cmd/ponzu/options.go @@ -204,16 +204,8 @@ func copyFilesWarnConflicts(srcDir, dstDir string, conflicts []string) error { return err } - if info.IsDir() { - if len(path) > len(srcDir) { - path = path[len(srcDir)+1:] - } - dir := filepath.Join(dstDir, path) - err := os.MkdirAll(dir, os.ModeDir|os.ModePerm) - if err != nil { - return err - } - + // skip copy root directory + if path == srcDir { return nil } @@ -228,6 +220,19 @@ func copyFilesWarnConflicts(srcDir, dstDir string, conflicts []string) error { } } + if info.IsDir() { + if len(path) > len(srcDir) { + path = path[len(srcDir)+1:] + } + dir := filepath.Join(dstDir, path) + err := os.MkdirAll(dir, os.ModeDir|os.ModePerm) + if err != nil { + return err + } + + return nil + } + err = copyFile(path, dstDir) if err != nil { return err |