From 19e8599a5ec13826f688b6e51d860780c08e6317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gae=CC=88l=20Foppolo?= Date: Mon, 12 Jan 2026 11:02:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20install=20XcodeGen=20bund?= =?UTF-8?q?led=20resources?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XcodeGen releases include runtime resources (e.g. share/xcodegen / XcodeGen_XcodeGenKit.bundle). Copy the full extracted archive into the asdf install prefix instead of only bin/xcodegen, and fail fast if resources are missing. --- lib/utils.bash | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/utils.bash b/lib/utils.bash index d0fc16b..9ae2507 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -60,25 +60,27 @@ download_release() { install_version() { local install_type="$1" local version="$2" - local install_path="${3%/bin}/bin" + local install_root="${3%/bin}" if [ "$install_type" != "version" ]; then fail "asdf-$TOOL_NAME supports release installs only" fi ( - mkdir -p "$install_path" + mkdir -p "$install_root" - # XcodeGen archive has bin/xcodegen after extraction - cp -r "${ASDF_DOWNLOAD_PATH}/bin/${TOOL_NAME}" "$install_path" + # Install the full extracted archive (xcodegen binary + bundled resources). + # XcodeGen requires additional runtime resources (e.g. share/xcodegen / bundle). + cp -R "${ASDF_DOWNLOAD_PATH}/." "$install_root/" local tool_cmd tool_cmd="$(echo "$TOOL_TEST" | cut -d' ' -f1)" - test -x "$install_path/$tool_cmd" || fail "Expected $install_path/$tool_cmd to be executable." + test -x "$install_root/bin/$tool_cmd" || fail "Expected $install_root/bin/$tool_cmd to be executable." + test -d "$install_root/share/xcodegen" -o -d "$install_root/XcodeGen_XcodeGenKit.bundle" || fail "Expected XcodeGen bundled resources to be installed (share/xcodegen or XcodeGen_XcodeGenKit.bundle)." echo "$TOOL_NAME $version installation was successful!" ) || ( - rm -rf "$install_path" + rm -rf "$install_root" fail "An error occurred while installing $TOOL_NAME $version." ) }