Skip to content

fix(backfill): ensure target directory exists before copying files#264

Closed
victorvhs017 wants to merge 1 commit into
mainfrom
fix/backfill-apply-all
Closed

fix(backfill): ensure target directory exists before copying files#264
victorvhs017 wants to merge 1 commit into
mainfrom
fix/backfill-apply-all

Conversation

@victorvhs017

Copy link
Copy Markdown
Contributor

Description 📣

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-cli-264-fix-backfill-ensure-target-directory-exists-before-copying-fil

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@greptile-apps

greptile-apps Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This one-line fix adds mkdir -p "$(dirname "$target")" before the cp call in publish_apk_file, ensuring the destination directory exists before a file is copied into it.

  • In normal execution apk_stage_existing pre-creates both arch directories (x86_64, aarch64) under the staging path, so this guard is a no-op in the happy path. It does make publish_apk_file self-contained and resilient to future callers or structural changes.
  • The change is scoped to the APPLY branch only (dry-run paths are unaffected), which is the correct placement.

Confidence Score: 5/5

A minimal, well-placed defensive guard with no regressions or side-effects.

The fix is a single mkdir -p call whose output is deterministic and idempotent. The target path is fully controlled by script-internal variables, quoting is correct, and the change touches only the live-copy branch. No existing logic is removed or reordered.

No files require special attention.

Important Files Changed

Filename Overview
scripts/backfill_from_cloudsmith.sh Adds mkdir -p before cp in publish_apk_file to ensure the target directory exists; safe defensive guard even though apk_stage_existing normally pre-creates both arch dirs.

Reviews (1): Last reviewed commit: "fix(backfill): ensure target directory e..." | Re-trigger Greptile

@victorvhs017 victorvhs017 deleted the fix/backfill-apply-all branch June 17, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant