Skip to content

Fix erroneously detecting gum as present when it's not. - #39

Merged
ikogan merged 1 commit into
mainfrom
cs/fix-gum-install
Aug 12, 2026
Merged

Fix erroneously detecting gum as present when it's not.#39
ikogan merged 1 commit into
mainfrom
cs/fix-gum-install

Conversation

@ikogan

@ikogan ikogan commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings August 12, 2026 19:37
@ikogan
ikogan merged commit 1b58d49 into main Aug 12, 2026
4 of 5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to prevent the script from incorrectly treating gum as installed/usable when it isn’t, and includes a small fix to the checksum-download logging path.

Changes:

  • Fix an info call that was accidentally passing -e as an argument.
  • Change the gum installation decision to use a runtime check (gum -v) instead of should_install "gum".
Suppressed comments (1)

adp-connect.sh:759

  • This install guard uses gum -v (runtime check), but earlier HAVE_GUM is initialized via which gum (line 2) and is used before this block (e.g., confirm() at ~739). If which reports a gum shim/alias/function (not an actual working gum binary), the script will try to run gum confirm before reaching this installation block and fail, so this change may not fully address the “gum present when it’s not” scenario.

Consider making HAVE_GUM reflect an executable gum (e.g., using type -P gum and/or gum --version), and/or moving the gum install/validation earlier so any gum-dependent UI paths can’t execute until gum is known-good.

if [[ -n "${FORCE_UPDATE}" ]] || ! gum -v &>/dev/null; then
    download_latest_release "charmbracelet/gum" "gum" "tar.gz" || exit 1
    extract_download "gum" "tar.gz" || exit 1
    install -m "0755" "${TEMP_DIR}/gum"*/"gum" "$HOME/.local/bin/gum" || exit 1
    info "🎉 Successfully installed gum!"

    HAVE_GUM="true"
fi

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants