mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 13:11:40 +00:00
fix: harden docker smoke packaging
This commit is contained in:
@@ -54,13 +54,21 @@ openclaw_live_stage_state_dir() {
|
||||
# Sandbox workspaces can accumulate root-owned artifacts from prior Docker
|
||||
# runs. They are not needed for live-test auth/config staging and can make
|
||||
# temp-dir cleanup fail on exit, so keep them out of the staged state copy.
|
||||
set +e
|
||||
tar -C "$source_dir" \
|
||||
--warning=no-file-changed \
|
||||
--ignore-failed-read \
|
||||
--exclude=workspace \
|
||||
--exclude=sandboxes \
|
||||
--exclude=relay.sock \
|
||||
--exclude='*.sock' \
|
||||
--exclude='*/*.sock' \
|
||||
-cf - . | tar -C "$dest_dir" -xf -
|
||||
local status=$?
|
||||
set -e
|
||||
if [ "$status" -gt 1 ]; then
|
||||
return "$status"
|
||||
fi
|
||||
chmod -R u+rwX "$dest_dir" || true
|
||||
if [ -d "$source_dir/workspace" ] && [ ! -e "$dest_dir/workspace" ]; then
|
||||
ln -s "$source_dir/workspace" "$dest_dir/workspace"
|
||||
|
||||
Reference in New Issue
Block a user