File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -376,23 +376,24 @@ function release::sandbox::create() {
376376
377377 # Copy repo content excluding .git, .release-state, node_modules
378378 # Try tar pipe first (faster), fallback to cp + rm for portability
379- # Disable errexit temporarily to allow tar fallback in strict mode
379+ # Use subshell + || to avoid interfering with caller's shell options
380+ # (set +e alone doesn't disable pipefail, which causes failures in strict mode)
380381 local tar_status=0
381- set +e
382- tar --exclude=' .git' \
383- --exclude=' .release-state' \
384- --exclude=' node_modules' \
385- --exclude=' .tasks' \
386- --exclude=' tmp' \
387- -cf - . 2> /dev/null | tar -xf - -C " $SANDBOX_DIR " 2> /dev/null
388- tar_status=$?
389- set -e
382+ (
383+ tar --exclude=' .git' \
384+ --exclude=' .release-state' \
385+ --exclude=' node_modules' \
386+ --exclude=' .tasks' \
387+ --exclude=' tmp' \
388+ -cf - . 2> /dev/null | tar -xf - -C " $SANDBOX_DIR " 2> /dev/null
389+ ) || tar_status=$?
390390
391391 if [ " $tar_status " -eq 0 ]; then
392392 release::log_verbose " Copied project files to sandbox (tar)"
393393 else
394394 # Fallback: traditional cp + rm for maximum portability
395- cp -r . " $SANDBOX_DIR /"
395+ # Use || true since cp may fail on transient files during parallel execution
396+ cp -r . " $SANDBOX_DIR /" 2> /dev/null || true
396397 rm -rf " $SANDBOX_DIR /.git" " $SANDBOX_DIR /.release-state" \
397398 " $SANDBOX_DIR /node_modules" " $SANDBOX_DIR /.tasks" " $SANDBOX_DIR /tmp"
398399 release::log_verbose " Copied project files to sandbox (cp)"
You can’t perform that action at this time.
0 commit comments