#!/usr/bin/env bash
# nerf-tg-validate -- Run terragrunt validate in the current module directory
# Generated from tg manifest. Do not edit directly.
# nerf:threat:read=workspace
# nerf:threat:write=none

set -euo pipefail

_NERF_DRY_RUN=""

usage() {
  cat >&2 <<'EOF'
Usage: nerf-tg-validate

Maps to: terragrunt validate --non-interactive

Run terragrunt validate in the current module directory.
EOF
  exit 1
}

while [[ $# -gt 0 ]]; do
  case "$1" in
    --nerf-dry-run) _NERF_DRY_RUN="true"; shift 1 ;;
    -h|--help) usage ;;
    --) shift; break ;;
    *) echo "error: unknown argument: $1" >&2; usage ;;
  esac
done

if [[ "$_NERF_DRY_RUN" == "true" ]]; then
  echo "dry-run: terragrunt validate --non-interactive"
  exit 0
fi

exec terragrunt validate --non-interactive
