doctor: harden corruption repair and JSONL config
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
@@ -316,6 +316,10 @@ func checkMetadataConfigValues(repoPath string) []string {
|
||||
|
||||
// Validate jsonl_export filename
|
||||
if cfg.JSONLExport != "" {
|
||||
switch cfg.JSONLExport {
|
||||
case "deletions.jsonl", "interactions.jsonl", "molecules.jsonl":
|
||||
issues = append(issues, fmt.Sprintf("metadata.json jsonl_export: %q is a system file and should not be configured as a JSONL export (expected issues.jsonl)", cfg.JSONLExport))
|
||||
}
|
||||
if strings.Contains(cfg.JSONLExport, string(os.PathSeparator)) || strings.Contains(cfg.JSONLExport, "/") {
|
||||
issues = append(issues, fmt.Sprintf("metadata.json jsonl_export: %q should be a filename, not a path", cfg.JSONLExport))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user