Skip to content

Conversation

Jguer
Copy link
Owner

@Jguer Jguer commented Sep 30, 2025

Users expect -B . to just build without installing which was never implemented.

man pages indicate this as a title, which is a similar pattern to -S and -Q which can induce the error

Fixes #2332

@Jguer Jguer requested a review from Copilot September 30, 2025 21:21
@Jguer Jguer self-assigned this Sep 30, 2025
Copy link
Contributor

@Copilot 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 implements the build-only functionality for the -B flag, allowing users to build packages without installing them unless the -i/--install flag is explicitly provided. This addresses the expected behavior where -B . should only build packages without installing them.

  • Adds logic to determine when to skip installation based on -B operation and absence of -i/--install flag
  • Introduces SetInstallBuiltPackages method to control installation behavior in the installer
  • Updates build operation handler to always call the install function (removing early return)

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/sync/sync.go Adds installation control logic based on command arguments
pkg/sync/build/installer.go Implements installBuiltPackages field and setter method
pkg/sync/build/installer_test.go Adds comprehensive test for build-only functionality
local_install_test.go Adds integration test for local build-only operation
cmd.go Removes conditional check that prevented build operation execution
main.go Updates version number
doc/yay.8 Updates documentation with git flags information
.devcontainer/ Updates development container configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or 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.

Documentation of -B build option is incomplete and misleading
1 participant