Skip to content
Snippets Groups Projects
Verified Commit 3ac9703b authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: sync command

parent 82e77d4a
No related branches found
No related tags found
No related merge requests found
...@@ -140,6 +140,7 @@ func SyncHtml(p string) error { ...@@ -140,6 +140,7 @@ func SyncHtml(p string) error {
destinationFile[absSource] = append(destinationFile[absSource], d) destinationFile[absSource] = append(destinationFile[absSource], d)
} }
} }
}
for _, r := range specification.Sync { for _, r := range specification.Sync {
source := r.Source source := r.Source
...@@ -154,7 +155,12 @@ func SyncHtml(p string) error { ...@@ -154,7 +155,12 @@ func SyncHtml(p string) error {
return err return err
} }
sourceNode := query.MatchFirst(sourceFiles[absSource]) s, ok := sourceFiles[absSource]
if !ok {
return fmt.Errorf("source file isn't found: %s", absSource)
}
sourceNode := query.MatchFirst(s)
dp := destinationFile[absSource] dp := destinationFile[absSource]
for _, d := range dp { for _, d := range dp {
...@@ -244,8 +250,6 @@ func SyncHtml(p string) error { ...@@ -244,8 +250,6 @@ func SyncHtml(p string) error {
} }
}
return nil return nil
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment