Browse Source

default to public if no path provided

Dennis Rodewyk 5 years ago
parent
commit
cff333e96b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      hugo-encrypt.go

+ 3 - 0
hugo-encrypt.go

@@ -64,6 +64,9 @@ func encryptPage(path string) {
 
 
 func main() {
 func main() {
 	sitePath := os.Args[1]
 	sitePath := os.Args[1]
+	if !sitePath {
+        sitePath = "public"
+    }
 	err := filepath.Walk(sitePath, func(path string, f os.FileInfo, err error) error {
 	err := filepath.Walk(sitePath, func(path string, f os.FileInfo, err error) error {
 		if f == nil {
 		if f == nil {
 			return err
 			return err