provisioning/reflection/handlers/ops-radicle-build-info.nu

22 lines
643 B
Text
Raw Permalink Normal View History

2026-05-12 02:40:14 +01:00
#!/usr/bin/env nu
use lib/runner.nu [run-reflection-mode, print-summary-and-exit]
def main [
--provisioning-root: string = "",
--json, # emit raw JSON output per step instead of formatted table
]: 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 results = run-reflection-mode $"($root)/reflection/modes/ops-radicle-build-info.ncl" {} $root
if $json {
print ($results | to json)
} else {
print-summary-and-exit $results
}
}