Skip to content

Commit b43cbbc

Browse files
committed
fix(devcontainer): use cp instead of symlinks for workflow install
Symlinks into a temp directory broke when the directory was deleted after postinstall completed. Copying files ensures workflows persist. Also updates stale comments and retains ls -l for diagnostics.
1 parent ae28fbb commit b43cbbc

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

image/scripts/update-keystone.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -euo pipefail
55
UPDATE_FAILURES=0
66

77
echo "Updating keystone packages..."
8-
# Note: bun global installs may change symlink targets from ~/.local/lib to ~/.bun/install/global
9-
# This is acceptable - postinstall.sh uses ln -sf to cleanly overwrite existing symlinks
8+
# Note: bun global installs may change paths from ~/.local/lib to ~/.bun/install/global
9+
# This is acceptable - postinstall.sh uses cp -f to overwrite existing files
1010

1111
if ! bun install -g github:ZookAnalytics/keystone-cli; then
1212
echo "⚠ keystone-cli update failed, using existing version"
@@ -37,7 +37,7 @@ if [ -f "$WORKFLOWS_PKG" ]; then
3737
else
3838
echo "keystone-workflows: (installed via bun global)"
3939
fi
40-
echo "workflows path: $(ls -la ~/.keystone/workflows/*.yaml 2>/dev/null | head -1 || echo 'not found')"
40+
echo "workflows path: $(ls -l ~/.keystone/workflows/*.yaml 2>/dev/null | head -1 || echo 'not found')"
4141

4242
# Report update status (exit 0 for graceful degradation per AC5)
4343
if [ "$UPDATE_FAILURES" -gt 0 ]; then

packages/keystone-workflows/scripts/postinstall.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ if [ ! -d "$CONFIG_DIR" ]; then
1616
fi
1717

1818
# 1. Install workflows to ~/.keystone/workflows/
19-
# Uses ln -sf to force-overwrite existing symlinks (handles updates cleanly)
2019
WORKFLOW_TARGET="$HOME/.keystone/workflows"
2120
mkdir -p "$WORKFLOW_TARGET"
2221
WORKFLOW_COUNT=0
2322
for f in "$WORKFLOWS_DIR"/*.yaml; do
2423
[ -e "$f" ] || continue # Handle no matches
25-
ln -sf "$f" "$WORKFLOW_TARGET/$(basename "$f")" # -f overwrites existing
24+
cp -f "$f" "$WORKFLOW_TARGET/$(basename "$f")"
2625
WORKFLOW_COUNT=$((WORKFLOW_COUNT + 1))
2726
done
2827
if [ "$WORKFLOW_COUNT" -eq 0 ]; then

0 commit comments

Comments
 (0)