Skip to content

Commit

Permalink
Merge pull request #124 from kleewho/issue_122_validate_yaml_dates
Browse files Browse the repository at this point in the history
Read yaml files with CORE_SCHEMA
  • Loading branch information
epoberezkin authored Mar 29, 2021
2 parents aa7c506 + b361b12 commit ef7443a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function decodeFile(contents: string, format: string): any {
return JSON5.parse(contents)
case "yml":
case "yaml":
return yaml.safeLoad(contents)
return yaml.safeLoad(contents, {schema: yaml.CORE_SCHEMA})
default:
throw new Error(`unsupported file format ${format}`)
}
Expand Down

0 comments on commit ef7443a

Please sign in to comment.