summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/import_jekyll.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/commands/import_jekyll.go b/commands/import_jekyll.go
index 30a86528f..25228c9f2 100644
--- a/commands/import_jekyll.go
+++ b/commands/import_jekyll.go
@@ -260,7 +260,7 @@ func createConfigFromJekyll(inpath string, kind string, jekyllConfig map[string]
return nil
}
-func copyFile(source string, dest string) (err error) {
+func copyFile(source string, dest string) error {
sf, err := os.Open(source)
if err != nil {
return err
@@ -276,13 +276,17 @@ func copyFile(source string, dest string) (err error) {
si, err := os.Stat(source)
if err != nil {
err = os.Chmod(dest, si.Mode())
+
+ if err != nil {
+ return err
+ }
}
}
- return
+ return nil
}
-func copyDir(source string, dest string) (err error) {
+func copyDir(source string, dest string) error {
fi, err := os.Stat(source)
if err != nil {
return err
@@ -314,7 +318,7 @@ func copyDir(source string, dest string) (err error) {
return nil
}
-func copyJekyllFilesAndFolders(jekyllRoot string, dest string) (err error) {
+func copyJekyllFilesAndFolders(jekyllRoot string, dest string) error {
fi, err := os.Stat(jekyllRoot)
if err != nil {
return err