#!/usr/bin/env nu use lib/runner.nu [run-reflection-mode, print-summary-and-exit] def main [ --provisioning-root: string = "", --schemas-root: string = "", ]: nothing -> nothing { let root = if not ($provisioning_root | is-empty) { $provisioning_root } else { $env | get -o PROVISIONING_ROOT | default ($env.FILE_PWD | path join ".." | path expand) } let schemas = if not ($schemas_root | is-empty) { $schemas_root } else { $"($root)/schemas/lib" } let results = run-reflection-mode $"($root)/reflection/modes/validate-playbooks.ncl" { provisioning_root: $root, schemas_root: $schemas, } $root print-summary-and-exit $results }