diff --git a/scripts/website/copy_jsonschema/main.go b/scripts/website/copy_jsonschema/main.go index c41eb900bd9e..e556f9574819 100644 --- a/scripts/website/copy_jsonschema/main.go +++ b/scripts/website/copy_jsonschema/main.go @@ -32,7 +32,7 @@ func copySchemas() error { return fmt.Errorf("copy FS: %w", err) } - err = copyLatestSchema() + err = copyLatestSchema(dstDir) if err != nil { return fmt.Errorf("copy files: %w", err) } @@ -40,7 +40,7 @@ func copySchemas() error { return nil } -func copyLatestSchema() error { +func copyLatestSchema(dstDir string) error { src := filepath.FromSlash("jsonschema/golangci.jsonschema.json") latest, err := github.GetLatestVersion() @@ -71,7 +71,7 @@ func copyLatestSchema() error { } for _, dst := range files { - err = copyFile(dst, source, info) + err = copyFile(filepath.Join(dstDir, dst), source, info) if err != nil { return fmt.Errorf("copy file %s to %s: %w", src, dst, err) }