Skip to content

Honor managed package config when installing by repo target#10

Closed
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-eget-toml-install-issue
Closed

Honor managed package config when installing by repo target#10
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-eget-toml-install-issue

Conversation

Copy link
Copy Markdown

Copilot AI commented May 6, 2026

eget install <owner>/<repo> was bypassing packages.<name> config entries even when that repo was already declared in eget.toml. As a result, installs could skip configured package/global defaults such as the target directory.

  • Install request resolution

    • Extend install target lookup to resolve managed package config by matching the requested repo against packages.<name>.repo, not just the package name.
    • Preserve existing behavior when there is no unique managed package match.
  • Config application

    • Reuse the matched package section when merging install options, so repo-based installs inherit the same config as name-based installs.
    • This makes package-specific fields like target, tag, and other merged defaults apply consistently for both:
      • eget install gomi
      • eget install babarot/gomi
  • Regression coverage

    • Add a focused test for a config like:
[global]
target = "~/.local/bin"

[packages.gomi]
repo = "babarot/gomi"
target = "~/managed/bin"
tag = "v1.6.3"
  • The new coverage asserts that installing babarot/gomi uses the managed package config and does not fall back to the global target.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/babarot/gomi/releases/latest
    • Triggering command: /tmp/eget-test /tmp/eget-test install --quiet babarot/gomi (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix eget not respecting eget.toml during package installation Honor managed package config when installing by repo target May 6, 2026
Copilot AI requested a review from inhere May 6, 2026 14:21
Copilot finished work on behalf of inhere May 6, 2026 14:21
@inhere inhere marked this pull request as ready for review May 6, 2026 14:32
Copilot AI review requested due to automatic review settings May 6, 2026 14:32
Copy link
Copy Markdown

Copilot AI left a comment

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 fixes install-option resolution so eget install <owner>/<repo> correctly reuses an existing managed package entry ([packages.<name>]) when that entry’s repo matches the requested repo target. This makes repo-based installs inherit the same package-specific defaults (e.g., target, tag) that previously only applied when installing by package name.

Changes:

  • Extend install target lookup to match managed packages by packages.<name>.repo when the CLI target is a repo.
  • Reuse the matched package section when merging install options, so repo installs inherit managed package settings.
  • Add a regression test ensuring repo installs prefer managed package target over global.target.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/app/install.go Adds repo-to-managed-package matching and uses the matched package section when resolving install options.
internal/app/install_test.go Adds a regression test verifying managed package config is honored when installing by repo target.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants