Skip to content

Readme example has invalid constraints #44

@Josh-TX

Description

@Josh-TX

When running this with the yaml from the README, there's several errors in the disk_usage tools's constraints:

  1. - "max_depth >= 1 && max_depth <= 3" - errors because it compares a int to a double. Either use int(max_depth), use 1.0 instead of 1, or preferable set cel's CrossTypeNumericComparisons to true
  2. - "directory.matches('^[\\w\\s./\\-_]+$')" - errors because the backslash gets escaped by the yaml parsing since it's in double quotes. Either wrap with single quotes or use the - |\n block scalar. Amusingly "directory.matches('^[\\\\w\\\\s./\\\\-_]+$')" also works

I got these errors on both windows 11 and Arch. I almost moved on before realizing what was happening. Everything's been fine since.

Thank you for this project btw

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions