Add mkdir -p "$outdir" before the tar command to ensure the output directory exists before attempting to create the tarball. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>