Skip to content

(via norrietaylor): Add error checking to mktemp calls for WORK variable in bulk-upload-e2e. - #903

Merged
macroscopeapp[bot] merged 1 commit into
test/bulk-upload-canary-869from
macroscope/test/bulk-upload-canary-869
Jul 22, 2026
Merged

(via norrietaylor): Add error checking to mktemp calls for WORK variable in bulk-upload-e2e.#903
macroscopeapp[bot] merged 1 commit into
test/bulk-upload-canary-869from
macroscope/test/bulk-upload-canary-869

Conversation

@macroscopeapp

@macroscopeapp macroscopeapp Bot commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Added error checking to both mktemp calls for the WORK variable in scripts/bulk-upload-e2e.sh to ensure the script fails safely if temporary directory creation fails.

Changes

  • Added error checking after the mktemp call on line 118 (Darwin/macOS path)
  • Added error checking after the mktemp call on line 122 (Linux path)
  • Script now aborts immediately with a descriptive error message to stderr if mktemp fails

Motivation

Without this check, if mktemp fails and WORK is empty or invalid, the EXIT trap could potentially execute rm -rf on an unintended path, risking destruction of unrelated developer sessions or files. The script now fails fast with a clear error message, preventing this dangerous scenario.

Note

Macroscope: Fix It For Me

  • This PR originated from this comment in test(scripts): canary the bulk host-to-guest upload path #887.
  • Since auto-merge is on, Macroscope will merge this PR after waiting for checks to pass.
  • If you'd rather not wait, you can always merge this yourself but no further action from you is currently needed.
  • You can also @mention Macroscope in this PR to request further changes.

Activity

Currently: Auto-merged 8832709

Previously

Note

Add error handling to mktemp calls for WORK variable in bulk-upload-e2e.sh

On both macOS and non-macOS branches, the mktemp call that creates the WORK temp directory now fails fast: if mktemp returns a non-zero exit code, the script prints an error to stderr and exits with status 1 instead of continuing with an empty or invalid path.

Macroscope summarized 917320e.

@macroscopeapp
macroscopeapp Bot merged commit 8832709 into test/bulk-upload-canary-869 Jul 22, 2026
1 check passed
@macroscopeapp
macroscopeapp Bot deleted the macroscope/test/bulk-upload-canary-869 branch July 22, 2026 13:32
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