Fix entrypoint: Copy custom-built opencode binary to persisted directory
This commit is contained in:
@@ -176,6 +176,15 @@ fi
|
||||
ensure_cli_wrappers() {
|
||||
local bin_dir="$PERSISTED_OPENCODE_DIR/bin"
|
||||
mkdir -p "$bin_dir"
|
||||
|
||||
# Check if we have a custom-built binary at /usr/local/bin/opencode (not a symlink)
|
||||
if [ -f "/usr/local/bin/opencode" ] && [ ! -L "/usr/local/bin/opencode" ]; then
|
||||
# Copy the custom-built binary to the persisted directory
|
||||
log "Copying custom-built opencode binary to persisted directory"
|
||||
cp -f "/usr/local/bin/opencode" "$bin_dir/opencode"
|
||||
chmod +x "$bin_dir/opencode"
|
||||
fi
|
||||
|
||||
# Only create symlink for opencode command itself
|
||||
if [ ! -L "/usr/local/bin/opencode" ]; then
|
||||
ln -sf "$bin_dir/opencode" "/usr/local/bin/opencode"
|
||||
|
||||
Reference in New Issue
Block a user